IFS Workflows – Think Big… Start Small…

When I started developing on IFS Cloud, I didn’t have much faith in the workflows since every time I started developing a flow, it rather had a limitation so had to turned into PLSQL event action or a customization. Over the time, it’s impressive to see how the workflow tool has evolved and now I’m a really a fan due to the capabilities which were not possible in previous IFS versions such as Process enrichments and REST API calls.

Blog post What you need to know about IFS Business Process Automation by Chris Wharton was an eye opener for me to start writing about workflows. Chris has done a really good analysis on workflows and I agree to the every word, specially, start small!

This blog post dives into an exemplary use case of IFS Cloud Workflows, providing a step-by-step guide to help you create your first workflow.

  1. Business Scenario
  2. Workflow Configurations
    1. Step 1 – Understand the Projection calls from the client
    2. Step 2 – Creating the Workflow
    3. Step 3 – Creating the Trigger
  3. Extending the Workflow

Business Scenario

This post is about creating a simple workflow with Process enrichment, a really cool capability of workflows. In one IFS Community post, an user has asked if it’s possible to Set Default Language to English (en) and Country to United States (US) by default when a customer or supplier record is created.

This may look a simple requirement, and a very good example of improving efficiency since these are mandatory fields Customer/Supplier creation if you have most of local customers and suppliers, it would save some clicks and typing when creating a record.

Customer page in IFS Cloud

If we were to do this in IFS 10 or earlier, a customization would be needed even though it’s a very small change. We’ll dive into details how it can be done using a simple workflow.

Workflow Configurations

The idea here is to set default values when creating a record. Most suitable workflow type for this type of a requirement is Process enrichment workflow types, which makes possible to alter the input values (enrich the transaction) during a projection operation call.

Step 1 – Understand the Projection calls from the client

You can open the browser DevTools or the IFS log window, and press New record button. It will list down the projection calls made to get the default values. My personal choice is DevTools and in the Network tab, you can see the the projection call to get the default values and the response.

Projection call
GET /SupplierHandling.svc/SupplierInfoGeneralSet/IfsApp.SupplierHandling.SupplierInfoGeneral_Default()
Response

What we can do to set the default values is to modify the response payload, and set the desired values from the workflow.

Step 2 – Creating the Workflow

  • Navigate to the Workflow page, and create a new workflow. Give a Process key and create.
  • It automatically creates the first version when creating the workflow. We can now start designing our workflow configuration. Click the Design button. It will open the Workflow Designer.

Our workflows only needs two tasks. Script task to set the default values and IFS Process Enrichment task to add the values to the response.

Script task to set the default values. Attribute names can be found from the debug output.
IFS Process Enrichment task to add the values to the response
  • Validate and Deploy the workflow.

Step 3 – Creating the Trigger

We need to run the workflow when the projection call /SupplierHandling.svc/SupplierInfoGeneralSet/IfsApp.SupplierHandling.SupplierInfoGeneral_Default() is execued.

  • Add a new Projection action and put SupplierHandling as the Projection Name.
  • In the Projection Action Configuration, set following values
    • Action Type: CALL
    • Call Name: SupplierInfoGeneral_Default():SupplierInfoGeneral
    • Execution Type: Process Enrichment
    • Timing: After
  • Enable Projection Action in the next step and Finish

That’s all we need to do to make this work!

Go back to Supplier page and Add New. Now you should get the Country and Default Language pre-filled.

Extending the Workflow

Now we have the basic working workflow in place and the possibilities are unlimited to extend the workflow according to your business needs.

One example is that the same workflow can be used to set default values in Customer since it also has the same fields. You just need to add another projection action to the workflow.

You can even use the same concept to fetch the values from an external API and set them accordingly.

I hope this would give a basic understanding on how to begin with workflows and use it in the business requirements. Stay tuned for more interesting scenarios using workflows.

Please comment your thoughts and if there are any interesting scenario I could be use for my next post!

3 thoughts on “IFS Workflows – Think Big… Start Small…

Add yours

Leave a comment

Website Powered by WordPress.com.

Up ↑