Once you have the authentication and the forms, you can create the process to connect all the elements into a working flow.
To create the process:
-
In the project, select New > Process.
The Create Process dialog box is displayed.
- Enter the Process name, for example create-nuxeo-document and select Create Process.
-
Click on the process editor background. From the right pane, select
Edit Process Variables and use the Create
process variable to add the following:
-
metadata variable:
Select Variable type to json. Select Save and add new.
-
outputDocumentId variable:
Select Variable type to string. Select Save and go back to the process tab.
-
metadata variable:
- Select the start event in your process and select the previously creaated nuxeo-create-document-form from the Form name drop-down menu.
- From the palette on the left, drag the Nuxeo connector to the process editor and drop it next to the circle that signifies the process start.
-
Select the Nuxeo connector. In the right pane:
- Enter the task name, for example Create document.
- Select the Nuxeo authentication. In this example, it was called Nuxeo-auth.
- Select the CREATE_DOCUMENT action from the Action drop-down menu.
-
From the palette on the left, drag the Create User Task
to the process editor and drop it next to the Nuxeo connector. Select it and
edit the following properties in the right-hand pane:
- Enter the task name, for example Display document id.
- From the Form name, select the result form. In the example, it was called display-doc-id-form.
- In the Input mapping section, find the created document id parameter and select the outputDocumentId variable in the drop-down menu next to it.
- From the palette on the left, drag the End event and drop it next to the second user task.
- Connect the process elements, by clicking them and selecting arrows.
-
Select the Nuxeo connector within the process
again.
-
In the Input mapping section select the
appropriate form fields from the created Source and Target Choice
form:
Parameter Value content Select the HxP Content to be Copied from the drop-down menu. documentMetadata Select the Nuxeo metadata from the drop-down menu. documentName Select the Document name from the drop-down menu. documentType Select the Document type from the drop-down menu. parentDocumentPath Select the Parent document path from the drop-down menu. - In the Output mapping section, select outputDocumentId from the outputDocumentId drop-down menu.
-
In the Input mapping section select the
appropriate form fields from the created Source and Target Choice
form:
The process has been created successfully aand can now be used to
create new documents within the Nuxeo repository.