Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 28 Next »

Introduction

Each workflow that is being triggered within the CoreOne Suite has a predefined input object stored in 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 therefore documents the most common workflow triggers and their appropriate data structure.

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.

{
  "activityId": null,
  "correlationId": null,
  "contextId": null,
  "input": {
	  "Data": {
		Id : 5450,
		DisplayName : "Beate Gielsdorf",
		TypeName : "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.OrganizationUnit",
		ExternalIdentifier: "CHE 367367116"
	  },
	  "Context": {
		  "CoreIdentityId": 3265,
		  "UserId": 17177,
		  "AppCustomerId": 900000
		}
	}
}

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

You can define repository-based strategy to run this workflow after object creation

Data structure

"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

"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

"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

"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

"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

"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

"Data": {
  id : uint,
  displayName : string,
  typeName : string,
  externalIdentifier: string
}

Example

"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

"Data": {
  id : uint, //id of the activated organization unit
  displayName : string,
  typeName : string
}

Example

"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

This workflow is triggered after the system has generated a new activation code for an organizational unit

Data structure

"Data": {
  id : uint,
  displayName : string,
  typeName : string,
  activationCode : string
}

Example

"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

"Data": {
  id : uint,
  displayName : string,
  typeName : string,
  inviter: uint,
  comment: string,
  representationId: uint
}

Example

"Data": {
          "Comment": null,
          "Inviter": 13,
          "RepresentationId": 5,
          "Id": 13,
          "DisplayName": "Wiwoldi Wawrinka",
          "TypeName": "iTsense.Moving.Backend.Services.DmcoreService.Adapters.NHibernate.Servicedmcore.CoreIdentity"
}

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

"Data": {
  certificationId : uint,
  targetObjectId : uint,
  targetObjectTypeId : uint (based on servicedmcore_certification_object_type)
}

Example

"Data": {
  certificationId : 5450,
  targetObjectId : 1,
  targetObjectTypeId : uint (based on servicedmcore_certification_object_type)
}

C# class name

CertificationWorkflowInput

AfterRepresentationRelationshipCreate

Workflow Type Name (Id)

AfterRepresentationRelationshipCreate, 27

Configured on

Core identity type

Description

When the representation relationship is created

Data structure

"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

"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

"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

"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

"Data": {
  Id: uint,//organization unit id
  CoreIdentityId: uint,//employee core identity id
  EmploymentTypeId: uint?,
  ValidFrom: DateTime,
  ValidTo: DateTime?,
  EmploymentNumber: uint?,
  FunctionId: uint?
}

Example

"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

"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

"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

  • No labels