If some of the steps your processes have to pass are separate business processes in themselves, you can do these steps in a separate subprocess form.
A subprocess is a subtask that is automatically created in the main form task at a set step of its routing.
Data is automatically transferred into the subprocess from the main form, and the results of the subprocess automatically appear in the main form.
Example: a CFO has approved a laptop purchase for a new employee in the Office Equipment Purchases form task.
Then, a payment subtask is automatically created, and a special bot sends a notification comment.
The name of the equipment and the approved amount are automatically loaded into the form.
When the accountant pays the invoice and closes the subtask, that data is sent to the main task, which then automatically passes to the next step of the process.
Pyrus Tip: you don’t need to wait for the subprocess to be completed to keep working in the main task. Just select the appropriate checkmark in the subprocess settings.
Here, you can also specify that the subprocess is to remain open when the main task is closed.
In the form routing editor, choose the step at which to automatically create the subtask, and turn on the
Select the form to create the subprocess in.
Important: make sure the subprocess is routed so that tasks go to the assignee’s Inbox.
Press the Set up button under the row with the step name.
In both forms, specify the fields between which to exchange data.
Pyrus Tip: in the window for setting up interform data exchange, the subprocess form is always on the left, and the main form is on the right. The arrows between them indicate the direction of data transfer. The direction of transfer can be changed with one click.
If fields’ u_codes in the main form and the subprocess form correspond, exchange between them will be established automatically. You can delete it manually on the subprocess settings page.
Pyrus Tip: a u_code is a field id that can be specified in the settings block for the field in the form template editor. More about form template types
At the bottom of the settings page, set the conditions for:
the main task to pass to the next step;
the subtask to be closed.
Pyrus Tip: if the main task is returned to a step with subprocesses that are already completed, they will be created again.
Save your changes.
Now, when equipment purchases are approved, an invoice is automatically generated, autofilled with the name of the equipment and the amount. The subprocess task is displayed together with regular subprocesses, in the right panel of the main task.
You can automatically create several subprocesses at the same approval step of a form request. Say you need to get a partner conference program approved, which will feature a series of presentations and reports.
One step of this process is approving the timing and content of the reports. It’s inefficient to discuss the details of each separate presentation in its own task; it makes sense to create a step in the main task, where a subprocess for each presentation is created automatically.
To do this, create a Table type field in the main form, and place the fields for entering the topics and details of the presentations under it.
Then, create a subprocess form with non-table fields that correspond to the fields of the table in the main form.
Specify the step at which to create the subprocesses in the routing of the main form, and in the subprocess settings, set up the data exchange between the main form and the subprocess form.
Now, in the conference presentation approval step, several tasks will be created for each presentation indicated in the main task, according to the number of rows in the table.
Each presentation will be approved in a separate subtask, and the results of the approval will autofill in the main task. For example, if a presentation is approved in the subprocess, that data appears in the subtask.
Note: if, after configuring the correspondence between fields, you change a field in the subprocess form (for example, if you change a single row Text type field to one with multiple rows), the values of such fields will not be transferred to the main field.
Unless you have indicated in the subprocess settings that the main task can pass to the next step before all the subtasks are completed, when all the presentations are approved and the subtasks pertaining to them are closed, the main task will automatically go to the next step.
If you delete the presentation (the row from the table) at the subprocess creation step in the main task, the subprocess corresponding to that row will automatically close. If you enter a new presentation in the table, a new subprocess is created for it.
Note: if a new row is added to the table in the main form, the subprocess task will be created for it only at the subprocess step. The values of existing fields in incomplete tasks of the subprocess will be renewed regardless of the step the main task is on.
For Text, Checkmark, Numeral and Money type fields, you can create a constant. This is a fixed field value that remains unchanged no matter what changes are made to the field in the main form.
For example, say you have a process for developing video content for marketing events. This includes writing several steps:
- writing the script;
- creating the video;
- finalizing the sound.
You need to create 5 videos for the upcoming conference, which means each of the three steps of the process needs a number of subprocesses that corresponds to the number of videos you’re making. It’s also important that you collect all data on employee efficiency at each step for each video, so you can compare them in context.
To do this, go into the editor of the main form and create three steps with subprocesses: approving the script, approving the video, and approving the sound.
When configuring the correspondence of fields in each subprocess, specify that the constant value of the Type of work field will be transferred to the subprocess task, with each subprocess having its own.
Once all these steps are completed, the subprocesses will close and all the efficiency data will appear in the main task.