How Core Fields are populated on Upload from Safran

Modified on Thu, 18 Dec at 10:03 AM

TABLE OF CONTENTS


Introduction

If you make a Config using a Template with no ILAP Terms, the "standard" fields of a schedule (according to the new Schedule Data Ontology - SDO) will automatically be transferred during an upload.

This article describes the logic by which the Core field name is populated, on upload) from a Formula that resembles the actual source code used. It is applied relative to the various API response fields in Safran (note that the highlighted words correspond with column names in tables below). 

There will be a table for each Planning Object Type (Activity, ResourceAssignment, and Successor).

The logic can be "reversed" to deduce how the download process behaves.


Note that all the Core Fields for Activity and Resource Assignments can be overridden by mapping in Config.



Activity Core Fields

Core field nameApi response fieldFormula
ActivityType
3 = RegularActivity
6 = Hammock
4 = MilestoneStart
5 = MilestoneFinish
act_type
0 = Activity
1 = Hammock
5 = Start Milestone
6 = Finish Milestone
if act_type == 0  then return 3
if act_type == 1 then return 6
if act_type == 5 then return 4
if act_type == 6 then return 5
DescriptiondescriptionDescription = description
FinishAsEarlyAsPossiblenullnull
FinishNoLaterThannullnull
MustFinishOnfixed_finish_dateMustFinishOn = fixed_finish_date
MustStartOnfixed_start_dateMustStartOn = fixed_start_date
StartAsEarlyAsPossiblenullnull
StartAsLateAsPossibleas_late_as_possible_flagas_late_as_possible_flag == 1
StartNoEarlierThantarget_start_earlyStartNoEarlierThan = target_start_early
StartNoLaterThantarget_start_lateStartNoLaterThan = target_start_late
ActualFinishactual_finish,
current_actual_finish,
ExportConfiguration.ExportScope
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_actual_finish
else return ActualFinish = actual_finish
ActualStartactual_start,
current_actual_start,
ExportConfiguration.ExportScope
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_actual_start
else return ActualStart = actual_start
ActualWorkHoursexpended_qtyActualWorkHours = expended_qty.HasValue ? expended_qty.Value : 0,
CurrentProgresscurrent_progressCurrentProgress = current_progress ?? 0
EarlyStartbaseline_early_start_analyzed,
current_early_start_actual,
early_start_analyzed,
revised_plan_early_start_actual
if ExportConfiguration.ExportScope = ScopeEnum.Baseline
return baseline_early_start_analyzed
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_early_start_actual
if ExportConfiguration.ExportScope = ScopeEnum.Total
return early_start_analyzed
if ExportConfiguration.ExportScope = ScopeEnum.Revised
return revised_plan_early_start_actual
EarlyFinishbaseline_early_finish,
current_early_finish,
early_finish,
revised_plan_early_finish
if ExportConfiguration.ExportScope = ScopeEnum.Baseline
return baseline_early_finish
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_early_finish
if ExportConfiguration.ExportScope = ScopeEnum.Total
return early_finish
if ExportConfiguration.ExportScope = ScopeEnum.Revised
return revised_plan_early_finish
LateFinishbaseline_late_finish,
current_late_finish,
late_finish,
revised_plan_late_finish
if ExportConfiguration.ExportScope = ScopeEnum.Baseline
return baseline_late_finish
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_late_finish
if ExportConfiguration.ExportScope = ScopeEnum.Total
return late_finish
if ExportConfiguration.ExportScope = ScopeEnum.Revised
return revised_plan_late_finish
LateStartbaseline_late_start,
current_late_start,
late_start,
revised_plan_late_start
if ExportConfiguration.ExportScope = ScopeEnum.Baseline
return baseline_late_start
if ExportConfiguration.ExportScope = ScopeEnum.Current
return current_late_start
if ExportConfiguration.ExportScope = ScopeEnum.Total
return late_start
if ExportConfiguration.ExportScope = ScopeEnum.Revised
return revised_plan_late_start
FreeFloatHoursfree_float,
calType(from exported cal)
if calType == days return free_float*24.0
if calType == hours return free_float
if calType == minutes return free_float/60.0
TotalFloatHourstotal_float,
calType(from exported cal)
if calType == days return total_float*24.0
if calType == hours return total_float
if calType == minutes return total_float/60.0
PlannedWorkHoursbaseline_scope,
current_scope,
total_scope,
revised_scope
if ExportConfiguration.ExportScope = ScopeEnum.Baseline && hasValue
return baseline_scope
if ExportConfiguration.ExportScope = ScopeEnum.Current && hasValue
return current_scope
if ExportConfiguration.ExportScope = ScopeEnum.Total && hasValue
return total_scope
if ExportConfiguration.ExportScope = ScopeEnum.Revised && hasValue
return revised_scope
else return 0.0
RemainingWorkHoursPlannedWorkHours,
 CurrentProgress
RemainingWorkHours = PlannedWorkHours * (1 - (CurrentProgress / 100.0))
IsAlwaysOnScheduleon_targetIsAlwaysOnSchedule = on_target.HasValue && on_target.Value != 0,
IsCancelledcancelledIsCancelled = cancelled != null
CancelledDatecancelledCancelledDate = cancelled
PlannedProgressbaseline_planned_progress,
current_planned_progress,
current_planned_progress,
revised_planned_progress
if ExportConfiguration.ExportScope = ScopeEnum.Baseline && hasValue
return baseline_planned_progress
if ExportConfiguration.ExportScope = ScopeEnum.Current && hasValue
return current_planned_progress
if ExportConfiguration.ExportScope = ScopeEnum.Total && hasValue
return current_planned_progress
if ExportConfiguration.ExportScope = ScopeEnum.Revised && hasValue
return revised_planned_progress
DurationHoursduration,
duration_units,
calendar
if duration_units == days
if calendar.hasValue && SuccesfulylFetchSafranCalendarUsing"calendar"
return duration * fetchedCalendar.Hours
if calendar.hasValue && !SuccesfulylFetchSafranCalendarUsing"calendar"
return duration * 8
if !calendar.hasValue
return duration * 24
if duration_units == hours
return duration
if duration_units == minutes
return duration/60.0
return null
RemainingDurationHoursremaining_duration,
duration_units,
calendar
if duration_units == days
if calendar.hasValue && SuccesfulylFetchSafranCalendarUsing"calendar"
return remaining_duration * fetchedCalendar.Hours
if calendar.hasValue && !SuccesfulylFetchSafranCalendarUsing"calendar"
return remaining_duration * 8
if !calendar.hasValue
return remaining_duration * 24
if duration_units == hours
return remaining_duration
if duration_units == minutes
return remaining_duration/60.0
return null
FinishOnOrAfter(not supported)
FrontLineDatefrontline_dateFrontLineDate = frontline_date
CalendarIlapId (internal)Calendar?.IlapId (dto level assignment)
CodenameCode = name
HostObjectId (internal)safranProject.networkId,
id
safranProject.networkId|id
Calendarcalendar,
exportedCalendars
let x = ""
if calendar.hasValue
x = calendar
else if isDefault247CalendarCreatedBySystem
x = "_ILAP_24/7"
else if defaultCalendarWpn.HasValue
x = defaultCalendarWpn
Get firstOrDefault from exportedCalendars where calendarHostObjectId ends with "|x"



Resource Assignment Core Fields

There is a setup in Safran that allows some internal logic for which Resource Assignment should be included for an activity for 3 different "scope types" (Baseline, Current and Total):

These flags are set on so called "Status Update" in Safran according to the setup above, and these flags are then used in IDE code to determine which Resource Assignments to upload:           

Include = (exportscope = baseline && resourceAssignment.csh_flag) ||
(exportscope = current && resourceAssignment.rsh_flag) ||
(exportscope = total && resourceAssignment.tsh_flag) 


Core field nameApi response fieldFormula
PlannedHoursduration,
calType(from exported cal) as duration_units,
 (resource.calendar ?? safranActivity.calendar) as calendar
if duration_units == days
if calendar.hasValue && SuccesfulylFetchSafranCalendarUsing"calendar"
return duration * fetchedCalendar.Hours
if calendar.hasValue && !SuccesfulylFetchSafranCalendarUsing"calendar"
return duration * 8
if !calendar.hasValue
return duration * 24
if duration_units == hours
return duration
if duration_units == minutes
return duration/60.0
 return null
ActualHoursactual_qtyActualHours = actual_qty.HasValue ? actual_qty.Value : 0,
CurrentProgresscurrent_progressCurrentProgress = current_progress.HasValue ? current_progress.Value : 0d
ResourceIlapId
Resource?.IlapId(dto level assignment)
ProfileIlapId
Profile?.IlapId(dto level assignment)
ResourceUsageType
ResourceUsageType = ResourceUsageType.StaffTime(2)
CodesafranProject.networkId,
activity.id,
id
safranProject.networkId|activity.id|id
HostObjectIdsafranProject.networkId,
activity.id,
id
safranProject.networkId|activity.id|id
Profile

Resourceresource_def_idCheck if any exported resource's hostObjectId ends with -
 "|{resource_def_id}"



Successor Core Fields

This is the method by which Safran API fields are populating links in the internal IDE Core fields (which are not possible to override in Config mapping):

 

Core field nameApi response fieldFormula
Type
StartToStart = 0,
StartToFinish = 1,
FinishToStart = 2,
FinishToFinish = 3
activityLink.link_type
StartToStart = 1,
StartToFinish = 2,
FinishToStart = 3, FinishToFinish = 4
if activityLink.link_type == 1 return 0
if activityLink.link_type == 2 return 1
if activityLink.link_type == 3 return 2
return 3
LagHoursactivityLink.lag_time,
calType(from exported cal) as duration_units,
(activityLink.calendar) as calendar
if duration_units == days
if calendar.hasValue && SuccesfulylFetchSafranCalendarUsing"calendar"
return activityLink.lag_time * fetchedCalendar.Hours
if calendar.hasValue && !SuccesfulylFetchSafranCalendarUsing"calendar"
return activityLink.lag_time * 8
if !calendar.hasValue
return activityLink.lag_time * 24
if duration_units == hours
return activityLink.lag_time
if duration_units == minutes
return activityLink.lag_time/60.0
return null
CalendarIlapId(Internal use)Calendar?.IlapId
Calendarexported calendars,
activityLink.calendar as calendar
let x = ""
if calendar.hasValue
x = calendar
else if isDefault247CalendarCreatedBySystem
x = "_ILAP_24/7"
else if defaultCalendarWpn.HasValue
x = defaultCalendarWpn
Get firstOrDefault from exportedCalendars where calendarHostObjectId
 ends with "|x"
SuccessorObjectIlapId
SuccessorObject?.IlapId
SuccessorObjectsuccessor that was found
CodeactivityLink.network_id,
activityLink.prev_id,
activityLink.next_id,
 activityLink.link_type
activityLink.network_id|activityLink.prev_id|activityLink.next_id|
activityLink.link_type
HostObjectIdactivityLink.network_id,
activityLink.prev_id,
activityLink.next_id,
 activityLink.link_type
activityLink.network_id|activityLink.prev_id|activityLink.next_id|
activityLink.link_type




Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article