When I first started using using Nintex Workflow Cloud back in the early preview days, the first workflows that I created used various Start Events from both Nintex (Public Web Form, Nintex Mobile, Scheduled Start, External Start) and some external connectors (like Salesforce & Dynamics CRM).
As I jumped into NWC and started creating some workflows, I would pick a particular start event (say Public Web Form) and implement my workflow logic. Then I might decide that I want to test the same workflow logic but using a different start event, perhaps Nintex Mobile or Salesforce. However, one cannot simply change Start Events if there are any references in the workflow to the Start Event variables. These need to be removed before you can change the type of Start Event.
After developing a few processes with Nintex Workflow Cloud, I realized the best bet is to always put your core workflow logic in a workflow using the External Start Event.
Then you can create one or more additional workflows that leverage other Start Event types, which can easily call your core workflow via External Start. This is accomplished using the Call a Workflow action. Here are the steps:
- Create your core workflow using the External Start and add whatever start event variables that your workflow needs. Then implement the workflow logic and publish your workflow.
- Create a 2nd workflow, using whichever start event you expect the end users will need, such as Public Web Form, Nintex Mobile, Salesforce, etc. This workflow will need the identical start event variables as the first workflow. However, this workflow will only require one action.
- After the Start Event, simply drag the Call a Workflow action (from the Logic and Flow group) under the Start Event.
- In the configuration for the Call a Workflow action, the first setting is to select which workflow you wish to start. It will display a list of all published workflows that use an External Start Event:
After selecting the desired workflow, the configuration screen will display fields for each Start Event variable from the selected workflow. You can simply map the Start Event variables from the current workflow to the inputs of the workflow that you will call via External Start.
After mapping the Start Event variables, you can simply publish your 2nd workflow. If you know you need additional ways to call your core workflow logic, you can immediately repeat steps 2 – 5 above using other Start Event types.
By using the External Start event you’ll also be able to initiate your NWC workflow just as easily from Nintex for SharePoint 2013/2016 or SharePoint Online, using the “Start workflow in Nintex Workflow Cloud” action. Additionally, custom apps and other cloud services will be able to initiate your workflow using the OpenAPI (swagger) protocol.
Even if you don’t need to initiate your core workflow logic in multiple ways, NWC makes it so easy to use this pattern that its almost always a good idea to start with the External Start event. You just never know when your business requirements might change in the future; And this way you (and your NWC workflows) will always be prepared for new requirements.