There are various parts of IFS Cloud where we can connect our own business logic to assist our solution and to reduce manual steps.
As an introduction to IFS Workflows, we have outlined three steps to follow to help you get started.
✏️ Scenario - Create a “Sites Per User” record, when a new user is created |
When new users are created in IFS, they need a Sites Per User record. They can then be allocated to work with site level data such as parts, procurement and work orders. This is a manual step for the user and something that we can easily automate.
Step 1: Understand the Process and gather the data
To understand the API calls and the DATA required to support the process, non-technical users often find it helpful to walk through the process in IFS Cloud and review what happens in the background. This relies on you being comfortable with the browser development tools.
To open the browser tools, you can usually press CTRL+SHIFT+I or F12 depending on your browser. This will open a new screen where you will be able to see what IFS Cloud is doing when you run your process. Open the Network tab on the browser tools and then minimise the screen to return to IFS Cloud.
🧭 Navigate to the USERS screen. Create a new user and save the record. |
Using the Developer Tools. Look for a line on the left-hand side where the Request Method on the right-hand side is POST. Identify the SVC and details after the forward slash.
In this case we have UserHandling.svc and Users.
Select the Payload sub tab. You will be able to see all of the data that the save step committed. These are important to understand as we will need to reference some of these values later in the flow.
The value we will use for our flow will be the Identity field. This contains the username that we need for the next step in the process. Note the CASE of these tags as this is important. Identity and identity and IDENTITY will not be seen as the same text value.
🧭 Navigate to the SITES PER USER screen. Create a new record and save |
Identify the POST calls for the Sites Per User screen in the developer tool window.
This time we have SitesPerUserHandling.svc and UserDefaults.
On the Payload tab, we can see this call only passed over the Userid field.
🏆 We now understand the data we will use for our automation. |
Step 2: Create the Workflow
2.1: Create the Workflow Container
🧭Navigate to the WORKFLOW screen. Create a new workflow. Give the workflow a unique name and press OK. |
Your workflow container is now created.
2.2: Create the Workflow
On the workflow screen, expand the workflow record to expose the versioned workflow. Select this value and then press the Design button.
You are now taken to the workflow designer. A start node is shown by default. Build out your simple flow by hovering over the start node and adding a step. This could also be dragged from the toolbox.
On the step, give the step a name and then add an end event, this is a circle with a thicker border.
We now have a basic flow defined to start configuring our process.
Hover over the step and select the spanner icon.
Change this step to an “IFS Projection” step. Note, in some versions this may be titled “IFS API”
In the properties panel, we can define the details we captured from the Sites Per User creation process. In our case this was SitesPerUserHandling.svc. We enter that data here without the .svc suffix.
Define the Action = Create
Define the Projection Name = SitesPerUserHandling
Define the Entity Set Name = UserDefaults
This value was the part after the forward slash in the Sites Per User creation process.
Add a parameter. From our data, we understand that the SitesPerUser API needs to have a field called Userid. From the new user creation we understand that the data we need is in a field called Identity.
The data items in the workflow are referenced with a dollar sign and the field is wrapped in curly braces.
Remember that these values are case sensitive.
Define the Key = Userid
Define the Value = ${Identity}
Use the save icon and then press save and close on the popup when you are given the green success message.
Publish the workflow.
Enter a name for the workflow. This doesn’t drive anything and you can enter any string here. Click deploy and then close when given the green success message.
🏆You have now deployed your workflow. We now need to define the trigger |
2.3: Connect the Projection
🧭 Navigate back to the workflow screen and load your workflow. |
Expand the record and select the top node on the record selection.
Create a new projection action. This is where we will define the TRIGGER of the workflow. We can define multiple triggers if needed.
Define the Projection Name, this is the SVC value from the User creation process. Enter UserHandling and press next.
Define the Action Type DATA. Define the Entity Set Name, this is the value after the forward slash on the user creation process.
Define the CREATE action, this will fire when new user data is created.
Define the Execution Type = Process Enrichment and the Timing = After.
Press Next.
🏆You have now defined the trigger that will call your workflow |
🏎️Take it for a spin️ |
Step 3: Testing your Workflow
🧭Navigate to the USERS screen. |
Create a new user record, press the View User Sites button.
🧭 You are taken to the SITES PER USER screen. |
The header record is already created from your workflow.
🏆If the header record has been created, your workflow has been successful. |
Closing Notes and Next Steps
By using these steps, you should be able to create a simple workflow and have an understanding of some basic concepts to get you up and running. You can start thinking about how you can use these new skills to keep exploring workflows.
Techris Consulting has a lot of experience in the joys and pitfalls of workflow development. If you are interested in booking a training session to learn more, or need some consultation, please get in touch.