A workflow represents a grouping of steps such as bank, tax and super that can be used in an onboarding flow together.
Workflow creation at present is not a feature, as it is hardcodes to have bank, tax and super steps in that order.
When onboarding an employee, they will be assigned an instance of this workflow. When creating a workflow instance, insure you use the type
A profile (which is an employee) can have many workflow instances that are specific to them. No one else with have access to this instance except that profile.
Steps to implement a workflow
against a profile ID – this will include the completed instances. Workflow instances can be active, inactive or completed as a status. If there are no workflow instances it will currently return a 404 error (we will be updating this to return a blank array).
Filter for only active and inactive workflow instances (inactive instances are instances that an employee is yet to start, and active instances are where they have started but are yet to complete).
If I can’t find any active or inactive instances, I need to
Remembering to use the “type”: 00000000-0000-0000-0000-000000000000 for the payload of the workflow instance post. An instance ID will be returned.
If we have active and inactive instances - get the first active instance and get the instanceId (noted as “id” in the object of this instances)
against that instance ID to load the workflow screen (note- if the workflow instance is completed, we cannot get a token against that workflow - it can no longer be edited or viewed).