Table of Contents |
---|
Introduction
Each workflow that is being triggered within There are various workflow entry points in the CoreOne Suite has which each trigger a workflow with a predefined input object stored in as the input
variable and some static properties dependent on the workflow endpoint that you are calling such as ActivityId
, CorrelationId
and ContextId
. The input of the workflow definitions itself is not strongly typed. This page and the subsequent pages therefore documents document the most common workflow triggers entry points and their the appropriate input
data structure..
Workflow Entry Points by entity
Page Tree | ||||
---|---|---|---|---|
|
Test your workflows by using the API
You can test your workflows by emulating the workflow entry point through the API. Please make sure that you check the appropriate Swagger documentation for the endpoint that you are calling. For example if you would like to trigger a Workflow Definition, the input will look as shown below. The ActivityId
, CorrelationId
and ContextId
are used by the trigger endpoint and has a variable called input
. Inside of that input
you have to put the appropriate input for your specific workflow.
...
The input itself always has a Data
and a Context
section. The first contains the actual input data and the later the information about who is executing this workflow.
AfterCreate
...
Workflow Type Name (Id)
...
AfterCreate, 16
...
Configured on
...
Organization unit type
...
Description
...
this
...
Data structure
...
Code Block |
---|
"Data": {
id : uint, // id of created entity, such as the CoreIdentityId
displayName : string, // The display name of the created object such as "John Doe"
typeName : string // type name of the created entity such as "CoreIdentity"
} |
...
Example
...
Code Block |
---|
"Data": {
id : 1
displayName : "John Doe"
typeName : "CoreIdentity"
} |
...
C# class name
...
WorkflowDefaultInput
BeforeUpdate
...
Workflow Type Name (Id)
...
BeforeUpdate, 17
...
Configured on
...
Organization unit type
...
Description
...
When the UpdateWithWorkflow API method on the organization unit is invoked
...
Data structure
...
Code Block |
---|
"Data": {
id : uint, // Id of the updated object
displayName : string, // Organization unit record name
typeName : string, // always 'OrganizationUnit'
changedValues : object // Expando that contains the system_name and attribute value
details : ChangeDetails[]
}
where ChangeDetails
{
DisplayValue : object,
Name : string,
DisplayType : enum { String = 1, Date = 2, DateTime = 3, CheckBox = 4}
} |
...
Example
...
Code Block |
---|
"Data": {
"Id": 5445,
"DisplayName": "No need for activation Inc.",
"TypeName": "OrganizationUnit",
"ChangedValues": {
"ext_company_street": "New street",
"ext_company_zip_code": "12223"
},
"Details": [
{
"DisplayValue": "New street",
"Name": "Street",
"DisplayType": 1
},
{
"DisplayValue": "12223",
"Name": "Zip Code",
"DisplayType": 1
}
]
} |
...
C# class name
...
UpdateOrganizationUnitWorkflowInput
BeforeEmploymentCreate
...
Workflow Type Name (Id)
...
BeforeEmploymentCreate, 18
...
Configured on
...
Organization unit type
...
Description
...
When the createWithWorkflow API method on the core identity employment is invoked
...
Data structure
...
Code Block |
---|
"Data": {
"CoreIdentityId": uint, //new employee core identity id
"EmploymentTypeId": uint,
"OrganizationUnitId": uint,
"OrganizationUnitName": string,
"Comment": string,
"EmploymentStateId": uint,
"ValidFrom": DateTime,
"ValidTo": DateTime?,
"EmploymentNumber": uint?,
"Percentage": uint,
"TenantId": uint,
"CoreIdentityIdRequestingChange": uint?,
"Id": uint,
"DisplayName": string,
"TypeName": always string "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit"
} |
...
Example
...
Code Block |
---|
"Data": {
"CoreIdentityId": 3262,
"EmploymentTypeId": 1,
"OrganizationUnitId": 5445,
"OrganizationUnitName": "No need for activation Inc.",
"Comment": null,
"EmploymentStateId": 2, // 1 Inactive, 2 Pending Approval, 3 Active
"ValidFrom": "2021-11-18T00:00:00Z",
"ValidTo": null,
"EmploymentNumber": 1,
"Percentage": 100,
"TenantId": 1,
"CoreIdentityIdRequestingChange": 3265,
"Id": 0,
"DisplayName": "No need for activation Inc.",
"TypeName": "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit"
} |
...
C# class name
...
CreateCoreIdentityEmploymentWorkflowInput
ReloadExternalData
...
Workflow Type Name (Id)
...
ReloadExternalData, 23
...
Configured on
...
Organization unit type
...
Description
...
When OrganizationUnit/{id}/reload API method is invoked. Can be also invoked from before update method
...
Data structure
...
Code Block |
---|
"Data": {
id : uint,
displayName : string,
typeName : string,
externalIdentifier: string
} |
...
Example
...
Code Block |
---|
"Data": {
id : 5450,
displayName : "Beate Gielsdorf",
typeName : "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit,
externalIdentifier: "CHE 367367116"
} |
...
C# class name
...
ReloadExternalDataWorkflowInput
AfterActivation
...
Workflow Type Name (Id)
...
AfterActivation, 24
...
Configured on
...
Organization unit type
...
Description
...
Data structure
...
Code Block |
---|
"Data": {
id : uint, //id of the activated organization unit
displayName : string,
typeName : string
} |
...
Example
...
Code Block |
---|
"Data": {
id : 1,
displayName : "John Doe Inc.",
typeName : "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit
} |
...
C# class name
...
WorkflowDefaultInput
AfterActivationCodeGeneration
...
Workflow Type Name (Id)
...
AfterActivationCodeGeneration, 25
...
Configured on
...
Organization unit type
...
Description
...
workflow
...
Data structure
...
Code Block |
---|
"Data": {
id : uint,
displayName : string,
typeName : string,
activationCode : string
} |
...
Example
...
Code Block |
---|
"Data": {
id : 1,
displayName : "John Doe Inc.",
typeName : "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit",
activationCode : "CFJ*çKAF*D"
} |
...
C# class name
...
RequestNewActivationCodeForOrganizationWorkflowInput
AfterRepresentationCreate
...
Workflow Type Name (Id)
...
AfterRepresentationCreate , 26
...
Configured on
...
Core identity type
...
Description
...
Whenever a core identity representation is created
...
Data structure
...
Code Block |
---|
"Data": {
id : uint,
displayName : string,
typeName : string,
inviter: uint,
comment: string,
representationId: uint
} |
...
Example
...
.
...
...
C# class name
...
AfterRepresentationCreateWorkflowInput
DefaultCertificationWorkflow guid:e9773f49cc6c437094a6aa2bb4f80f5e
Workflow Type Name (Id) | - | ||
Configured on | - | ||
Description | Invoked from the CertificationTask - when object needs recertification - the workflow Guid is defined in task parameters | ||
Data structure |
| ||
Example |
| ||
C# class name |
|
AfterRepresentationRelationshipCreate
...
Workflow Type Name (Id)
...
AfterRepresentationRelationshipCreate, 27
...
Configured on
...
Core identity type
...
Description
...
When the representation relationship is created
...
Data structure
...
Code Block |
---|
"Data": {
Id: uint,//core identity id - same as Inviter
RepresentationRelationshipId: uint,
InviterId: uint,//core identity id
InviteeId: string,//core identity id
Comment: string,
ServiceName: string,
RightName: string
} |
...
Example
...
Code Block |
---|
"Data": {
Id: 1,
RepresentationRelationshipId: 34,
InviterId: 1,
InviteeId: 2,
Comment: "Hi John, Please accept my invitation",
ServiceName: "Tax Application",
RightName: "Submit Taxes"
} |
...
C# class name
...
AfterRepresentationRelationshipCreateWorkflowInput
AfterRepresentationRelationshipCreate
...
Workflow Type Name (Id)
...
AfterRepresentationRelationshipCreate, 27
...
Configured on
...
Organization unit type
...
Description
...
When the representation relationship is created in context of organization unit
...
Data structure
...
Code Block |
---|
"Data": {
Id: uint,//organization unit id
RepresentationRelationshipId: uint,
InviterId: uint,//core identity id
InviteeId: string,//core identity id
Comment: string,
ServiceName: string,
RightName: string,
OrganizationUnitName: string
} |
...
Example
...
Code Block |
---|
"Data": {
Id: 1,
RepresentationRelationshipId: 2,
InviterId: 1,
InviteeId: 2,
Comment: "Please accept",
ServiceName: "Tax application",
RightName: "Submit taxes",
OrganizationUnitName: "Müller Brauerei AG"
} |
...
C# class name
...
AfterLegalEntityRepresentationRelationshipCreateWorkflowInput
AfterEmploymentDelete
...
Workflow Type Name (Id)
...
AfterEmploymentDelete, 28
...
Configured on
...
Organization unit type
...
Description
...
After the employment is removed
...
Data structure
...
Code Block |
---|
"Data": {
Id: uint,//organization unit id
CoreIdentityId: uint,//employee core identity id
EmploymentTypeId: uint?,
ValidFrom: DateTime,
ValidTo: DateTime?,
EmploymentNumber: uint?,
FunctionId: uint?
} |
...
Example
...
Code Block |
---|
"Data": {
"CoreIdentityId": 3265,
"EmploymentTypeId": 5,
"ValidFrom": "2021-08-01T00:00:00",
"ValidTo": null,
"EmploymentNumber": 11,
"FunctionId": null,
"Id": 5445,
"DisplayName": "No need for activation Inc.",
"TypeName": "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit"
} |
...
C# class name
...
AfterEmploymentRemovedWorkflowInput
OrganizationUnitActivation
...
Workflow Type Name (Id)
...
OrganizationUnitActivation, 30
...
Configured on
...
Organization unit type
...
Description
...
When the organization unit is activated
...
Data structure
...
Code Block |
---|
"Data": {
"Initiator": {
"Id": uint, //core identity id
"Name": string,
"Email": string
},
"Participants": participant[],
"OrganizationUnitId": uint,
"Comment": string
}
where participant{
"Id": uint?, //core identity id - if user exists in our system
"Name": string,
"Email": string
} |
...
Example
...
Code Block |
---|
"Data": {
"Initiator": {
"Id": 13,
"Name": "Wiwoldi Wawrinka",
"Email": "wiwa@coreone.ch"
},
"Participants": [
{
"Id": 1,
"Name": "Simon Gubler - EXT",
"Email": "sigu@coreone.ch"
},
{
"Id": 6,
"Name": "Roland Fauler",
"Email": "rofa@coreone.ch"
},
{
"Id": null,
"Name": "Markus Prottner - NO ID ",
"Email": "mapo@coreone.ch"
}
],
"OrganizationUnitId": 5448,
"Comment": null
} |
...
C# class name
...
OrganizationUnitActivationRequestedWorkflowInput
IdentityProvision
...
Workflow Type Name (Id)
...
Provision, 33
...
Configured on
...
Identity Provision Configuration
...
Description
...
Used to do provisioning of identity by workflow
...
Data structure
...
Code Block |
---|
"Data": {
"IdentityId": uint
}, |
...
Example
...
Code Block |
---|
"Data": {
"IdentityId": 2410
}, |
...
C# class name
...
ProvisionIdentityWorkflowInput
...
OUTPUT
...
Workflow returns data about newly provisioned identity
...
OUTPUT Data structure
...
Code Block |
---|
{
"ObjectId": string,
"Password": string
}, |
...
OUTPUT C# class name
...
ProvisionIdentityWorkflowOutput
AfterIdentityProvision
...
Workflow Type Name (Id)
...
AfterProvision, 34
...
Configured on
...
Identity Provision Configuration
...
Description
...
After identity is provisioned
...
Data structure
...
Code Block |
---|
"Data": {
"IdentityId": uint,
"Password": string //byte representation of password
}, |
...
Example
...
Code Block |
---|
"Data": {
"IdentityId": 2410,
"Password": "cGFzc3Rham5lcHJ6ZXpwZm5l"
}, |
...
C# class name
...
AfterProvisionIdentityWorkflowInput
PostAssetUpdate
Workflow Type Name (Id)
PostUpdate, 35
Configured on
Asset type
Description
Post asset update. Has data of unchanged entity and changed one. The diff can expose what changes are made. For readablility Asset State was added as separate string property
Data structure
Code Block |
---|
"Data": {
"EntityBefore": AssetDataContract, //data contract with unchanged data
"StateBefore": string, //string representation of state enum
"AfterBefore": AssetDataContract, //data contract with changed data
"StateAfter": string,
}
where AssetDataContract{
"Id": uint,
"AssetTypeId": AccessDeniedHandler<uint>,
"AssetGroupId": AccessDeniedHandler<uint>,
"AssetStateId": AccessDeniedHandler<uint>,
"AutoAssignable": boolean,
"AssignmentObjectpropertycontributor": string, //can be "CoreIdentity", "ResourceDefinition" or NULL
"AssignmentReference": string,
"AssignmentReason": string,
"AssignmentTypeId": AccessDeniedHandler<uint>
} |
Example
Code Block |
---|
"Data": {
"EntityBefore": {
"Id": 3,
"AssetTypeId": {
"Value": 1,
"WasAccessDenied": false
},
"AssetGroupId": {
"Value": 1,
"WasAccessDenied": false
},
"AssetStateId": {
"Value": 2,
"WasAccessDenied": false
},
"AutoAssignable": true,
"TenantId": 1,
"AssignmentObjectpropertycontributor": "CoreIdentity",
"AssignmentReference": "15",
"AssignmentReason": "r:16",
"AssignmentTypeId": {
"Value": 2,
"WasAccessDenied": false
}
},
"StateBefore": "Assigned",
"EntityAfter": {
"Id": 3,
"AssetTypeId": {
"Value": 1,
"WasAccessDenied": false
},
"AssetGroupId": {
"Value": 1,
"WasAccessDenied": false
},
"AssetStateId": {
"Value": 1,
"WasAccessDenied": false
},
"AutoAssignable": true,
"TenantId": 1,
"AssignmentObjectpropertycontributor": null,
"AssignmentReference": null,
"AssignmentReason": null,
"AssignmentTypeId": {
"Value": 2,
"WasAccessDenied": false
}
},
"StateAfter": "NotAssigned"
}, |
C# class name
AssetPostUpdateWorkflowInput