Default Workflows

The following chapter will show you how the default process looks like and which workflows are involved. How does Workflows need to be configured and which parts needs or can be customized.

The Overview

Default Workflows Overview

The default has 4 Workflows

  • Transform

    The Transform recevies Events from Workers or other workflows. It prepares the Event and Fetches additional Data if needed. It also defines to which Targets-Systems the Object has to be delivered.

  • Process

    This is the Dispatcher of the Events. It will Queue the given Object into the Target-Systems Queue. It will Requeue the Object for a single Target, if there is any problem. The Prozess is the Main Workflow, it is generic and is used system-wide.

  • Client

    The Client gets Objects from the Queue and prepares them to be written to the Target-System. It will also create References in the Queue, if needed.

  • References

    If an Object needs to Reference others, like Groupmemberships or Member of Roles.

Transform

Transform

The Transform Workflow is for each source different. It uses includes of “custom data fetch” and “validate data” to be generic. If this does not fit your needs feel free to change the Workflow itself.

The Transform receives a “Trigger” from a Queue or any other Workflow / Worker. It will then:

  • Check if this Object should be processed at all
  • Fetch additional Data from any Sources it needs
  • Validate the Data

The Object can be added to the Requeue, if there is a problem. The Object can be ignored, if there is no need to sync it. You have to add “target” values for the process, or we will add the targets defined as env “TARGET”. Targets have to be comma delimited in the env. e.G: “ads1,txtout,others”

The Transform will add a Source State if States are enabled by env “STATES” set to true.

The following needs to be set / generated by the transform process

Controls:

  • action: This must be set to one of C(Create)/U(Update)/D(Delete)
  • target: All the target systems this Event should be dispatched to by the process, if not set, env TARGETS is used
  • system: (For States) the Source System the Event came from
  • resourceType: (For States) set this to the same value as Class
  • resourceIdentifier: (For States) set this to the “main” key of the Object. This is the PK of this Object within Ingrid
  • externalResourceIdentifier: (For States) set this to the “systems” key. This is needed to reference the Object in the system. PK of the “system”

Class: Class should be set to the Objectclass which is processed. E.G: user / group

Result.Data: The State Object of the Current Event, if State is used

Process

Process

The Process “dispatches” the current object to all the targets. the Targets should be queues. The channels are in the form of “ingrid.TARGET.queue”

If the Process is unable to reach a Target queue, it will requeue the object for the specific target only.

If a Queue is not available the Process will open an incident is env “INCIDENTS” is set to true.

The Process can be used Ingrid Wide. If you like you can also run multiple Processes. If you need to may start specific Processes for a Flow. Set the env “DEPLOYNAME” and configure a different input channel.

The process needs the following input

Controls:

  • target: All the target systems this Event should be dispatched to. If not set, env TARGETS is used

Class: Class should be set to the Objectclass which is processed. E.G: user / group

Result.Data: The State Object of the Current Event, if State is used

The process generates

Data: Copy from Request.Data

Controls:

  • Copy from Request.Controls
  • state: (For States) State for the current Target fetched from the State Object from the Result.Data
  • externalResourceIdentifier: (For States) Reference for the current Target fetched from the State Object from the Result.Data

Result: Copy from Request.Result

The Process has a Timeout of 5 Seconds for sending each Event. Queues should be used as Targets

Target Channel: The Channel used to send the Event for each Target is “ingrid.TARGET.queue”

Client

Client

The Client is Target System specific. It defines some generic implementation, but must be adepted for each Target System. Use includes where prossible. The Version 1 will have the generic part in it and “includes” every where, where system specific logic will be needed.

It features Audit if env “AUDIT” is set to true.

If the env “INCIDENTS” is set to true, it will open incidents, if it fails to perform operations on the target system.

If “STATE” env is true, it will maintain a state for the Target System.

The client needs the following input

Data: The Data to process

  • matchfield: A Field for Matching if the Operation is ©Create. This field is the ENV Variable “CLASS”-MATCHFIELD
  • pkfield: A Field for the Primary Key. This field must match the name in “CLASS”-PRIMARYKEY

Controls:

  • action: The Action the Client should execute (C/R/U/D)
  • target: Current Target
  • state: (For States) State for the current Target System
  • resourceType: (For States) set this to the same value as Class
  • resourceIdentifier: (For States) set this to the “main” key of the Object. This is the PK of this Object within Ingrid
  • externalResourceIdentifier: (For States) set this to the “systems” key. This is needed to reference the Object in the system. PK of the “system”

Result: (States) State Object opf the Current Object

Class: Objectclass for Current Request e.G: user / group

References

Reference

TODO (This is a Mockup WF)

At the moment its custom implementation

Requeue a References for several time by return error.

You can add a deadletter channel to the queue to handle references, that could not be done.

Deploy