Hello everyone,
I was wondering if any knows what the current recommendation for LCS management is currently. I know that this can be managed via Cloud Rules, Transforms, and Workflows. Each of which have there own pros and cons to using one over the other.
Currently in my tenant we are using the transform method. I need to modify this process to include a prehire logic to the process. After reviewing the current configuration of the transforms I am seeing that this was set up by a partner in a very complex manner.
While I understand why this is so complex (this was built pre-workflow) I am really wondering if I can simplify the process to be able to better algin with it being able to be managed by a team of 5. With only 1 member of that team with any development experience. Any recommendations welcome.
Example of current process:
WD - Static - Lifecycle State
Calls the following Transforms
- Transform - Static - isHotTerm
- DateCompare - HireDate to TermDate
- Transform - DateCompare - Involuntary Term
Json of transform
{
"id": "Redacted",
"name": "WD - Static - Lifecycle State",
"type": "static",
"attributes": {
"IS_RESCINDED": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "IS_RESCINDED",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"null"
]
},
"type": "firstValid"
},
"activeFlag": {
"attributes": {
"attributeName": "ACTIVE__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"terminationFlag": {
"attributes": {
"attributeName": "TERMINATED__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"terminationReason": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Term Reason Code__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"null"
]
},
"type": "firstValid"
},
"onLeaveFlag": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Status__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"null"
]
},
"type": "firstValid"
},
"isHotTerm": {
"attributes": {
"id": "Transform - Static - isHotTerm"
},
"type": "reference"
},
"hireDate_termDate": {
"attributes": {
"id": "DateCompare - HireDate to TermDate"
},
"type": "reference"
},
"involuntaryTerm": {
"attributes": {
"id": "Transform - DateCompare - Involuntary Term"
},
"type": "reference"
},
"value": "#if( $IS_RESCINDED.equals(\"true\") && !$activeFlag.equals(\"1\") )inactive#elseif( $terminationReason.equals(\"Involuntary\") && $hireDate_termDate.equals(\"terminate\") && ( $activeFlag.equals(\"0\") && $terminationFlag.equals(\"1\") ))$involuntaryTerm#elseif( !$onLeaveFlag.equals(\"null\") && $onLeaveFlag.equals(\"LOA\") )leave#elseif( $activeFlag.equals(\"1\") && $terminationFlag.equals(\"0\") )active#elseif( $activeFlag.equals(\"0\") && $terminationFlag.equals(\"1\") )$isHotTerm#{else}unknown#end"
},
"internal": false
}
Transform - Static - isHotTerm
Calls the following Transforms
- DateCompare - Pre Term and Inactive for LCS
Json of transform
{
"id": "Redacted",
"name": "WD - Static - isHotTerm",
"type": "static",
"attributes": {
"termReason": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Term SubReason Code__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Reason Code__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
"null"
]
},
"type": "firstValid"
},
"substring": "Involuntary"
},
"type": "indexOf"
},
"inactiveOrPreTerm": {
"attributes": {
"id": "DateCompare - Pre Term and Inactive for LCS"
},
"type": "reference"
},
"value": "#if( $termReason == -1 )$inactiveOrPreTerm#{else}inactive#end"
},
"internal": false
}
DateCompare - HireDate to TermDate
Json of transform
{
"id": "Redacted",
"name": "DateCompare - HireDate to TermDate",
"type": "dateCompare",
"attributes": {
"firstDate": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "Workday Production Sandbox",
"attributeName": "Hire Date__c"
},
"type": "accountAttribute"
},
{
"attributes": {
"sourceName": "Workday Sandbox",
"attributeName": "Hire Date__c"
},
"type": "accountAttribute"
},
"2021-08-06"
]
},
"type": "firstValid"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"secondDate": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"sourceName": "Workday Production Sandbox",
"attributeName": "Term Date__c"
},
"type": "accountAttribute"
},
{
"attributes": {
"sourceName": "Workday Sandbox",
"attributeName": "Term Date__c"
},
"type": "accountAttribute"
},
"1900-08-07"
]
},
"type": "firstValid"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "GTE",
"positiveCondition": "active",
"negativeCondition": "terminate"
},
"internal": false
}
Transform - DateCompare - Involuntary Term
Calls the following Transforms
- Transform - DateMath - getCurrentDate
Json of transform
{
"id": "Redacted",
"name": "Transform - DateCompare - Involuntary Term",
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"input": {
"attributes": {
"expression": "+1d/h",
"roundUp": true,
"input": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Test Data"
},
"type": "accountAttribute"
},
"2999-12-13"
]
},
"type": "firstValid"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"begin": 0,
"end": 10
},
"type": "substring"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"attributes": {
"id": "Transform - DateMath - getCurrentDate"
},
"type": "reference"
},
"operator": "gt",
"positiveCondition": "active",
"negativeCondition": "inactive"
},
"internal": false
}
DateCompare - Pre Term and Inactive for LCS
Calls the following Transforms
- Transform - DateCompare - Determine Preterm LCS
Json of transform
{
"id": "Redacted",
"name": "DateCompare - Pre Term and Inactive for LCS",
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"input": {
"attributes": {
"expression": "+3d/d",
"roundUp": false,
"input": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
"2999-12-31"
]
},
"type": "firstValid"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"begin": 0,
"end": 10
},
"type": "substring"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"attributes": {
"input": {
"attributes": {
"expression": "now/d",
"roundUp": false
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'hh:mmX",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"operator": "gte",
"positiveCondition": {
"attributes": {
"id": "Transform - DateCompare - Determine Preterm LCS"
},
"type": "reference"
},
"negativeCondition": "inactive"
},
"internal": false
}
Transform - DateMath - getCurrentDate
Json of transform
{
"id": "Redacted",
"name": "Transform - DateMath - getCurrentDate",
"type": "dateMath",
"attributes": {
"expression": "now-5h/s",
"roundUp": false
},
"internal": false
}
Transform - DateCompare - Determine Preterm LCS
Json of transform
{
"id": "Redacted",
"name": "Transform - DateCompare - Determine Preterm LCS",
"type": "dateCompare",
"attributes": {
"firstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"input": {
"attributes": {
"expression": "+1d/h",
"roundUp": true,
"input": {
"attributes": {
"input": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Production Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Sandbox"
},
"type": "accountAttribute"
},
{
"attributes": {
"attributeName": "Term Date__c",
"sourceName": "Workday Test Data"
},
"type": "accountAttribute"
},
"2999-12-13"
]
},
"type": "firstValid"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"begin": 0,
"end": 10
},
"type": "substring"
},
"inputFormat": "yyyy-MM-dd",
"outputFormat": "ISO8601"
}
},
"secondDate": {
"type": "dateMath",
"attributes": {
"expression": "now-6h/s",
"roundUp": false
}
},
"operator": "gt",
"positiveCondition": "active",
"negativeCondition": "preterm"
},
"internal": false
}
Critera for LCS
LSC State | Critera |
---|---|
PreHire | HireDate__c >= now.AddDays(-1) {User should move from PreHire to Active 24 hours before starting} |
Active | HireDate__c <= now.AddDays(-1) {User should move from PreHire to Active 24 hours before starting} |
PreTerm | User should move into PreTerm on last day worked. |
Inactive | This should be term date +3 days |
Purge | This needs to be retired |
Leave | This is a place holder for furture use |