Follow the steps below to create your first process aware e-form to help ensure information security in your process application allowing the right person to view or edit the right information at the right time.


What is a process aware e-form?

E-forms are used to gather and hold information that is essential for your process application. It is important when you have a process that involves several different users that not everything in the e-form is accessible or readable by all participants. The right information, at the right time for the right person ensures security and simplicity for the users in your process application. A process aware e-form has configured fields in it that show, hide and lock the fields depending on where in the process the e-form is being accessed.


Required prerequisites

You must have a process application that is runnable and an e-form that is created and modeled into your process application. If you haven't done this already, follow the steps in the articles:


Create a process aware e-form

1. E-forms have support for viewModes , which can be described as being the different modes in which an e-form can be viewed in. Depending on who is accessing the e-form the information in the form can be editable, locked or hidden.


The first thing you need to do is to define these viewmodes in the dataobjects in your process model. This is done by modeling your process model. In this case, let’s continue with the first process application from the different "Create your first" articles.



2. Right-click on the e-form template associated to the start-event and click on Properties.


There is an attribute available to all DataObjects call “ViewMode” which by default is blank. This is where you define a 'viewMode'.



3. A viewMode can be called anything you want, something descriptive in your process that describes the mode in which your e-form can be in. The viewMode CREATE could be the default, empty e-form template. REVIEW could be the mode in which the e-form is being reviewed. SUPPLEMENT could be the mode in which the initiator gets the e-form sent back to add additional information if the reviewer doesn’t really understand the entire content in the e-form. VALIDATE could be the viewMode in which the customer looks at the end result of the work we performed.


ViewModes allow configuration of which form fields should be hidden, locked and editable. This is a powerful tool to use in a process application where you want to use a single e-form that is intelligent enough to ensure that earlier created information cannot be altered or that sensitive or relative information cannot be read by participants that should not be able to.


Write CREATE in the ViewMode field found in Properties for our e-form template associated to your start event.



4. Click on the e-form associated to Task 1. You will notice that the content in the properties panel on the right hand side changes to show the properties for this e-form instead.


In the field ViewMode, write REVIEW.



5. In the third e-form DataObject, associated to Task 2, write HANDLE in the ViewMode field.



6. You have now finished defining your different viewModes for this process. Remember that you can have any number of viewModes in your process application. Different process applications may have more or less viewModes. Also note that several tasks can share the same e-form and in that way present the same viewMode for the e-form in two different tasks. You can also assign the same viewMode to more than one e-form which gives you a flexibile and powerful tool for presenting information to your process participants.


NOTE: ViewModes are case sensitive. As long as you write the exact same text in the ViewMode field they will be considered to share the same viewMode. Barium Best Practice is to write all viewModes in upper case alpha numeric text. Do not use special characters, spaces or anything other than A-Z, 0-9.


7. Save your process model.



8. Click on Process apps under Run.




9. Double-click on the process application using the process model you just modeled. In this case the application called My first application with an e-form.




10. Click on Application configuration.




11. Double-click on the e-form in the application that is modeled into your process model, where you just added the viewModes and that you wish to make process-aware.



12. In the e-form you have to decide how each field in the e-form is supposed to be presented in each viewMode that you just defined in your process model.


You do this by adding two specific attributes to each field called hideInViewModes and lockInViewModes.


For each field you have to define in which ViewModes the field should be locked or hidden. Simply write the viewModes (comma-separated to choose more than one viewMode). When the e-form is presented in its viewMode the fields will act according to your set up for each form field.




13. Click inside the form field called Instance name to highlight it and to see the attributes for the field show up on the bottom right hand of the browser.


14. In the field called Add start writing lockInViewModes. You will see that the attributes field will start filtering your choices as you keep writing the text.



Continue writing the entire attribute text lockInViewModes or click on the text in the list with your mouse. Hit Enter on your keyboard twice and make sure you see the attribute in the Name column with the Value column to the right hand side of it empty.


15. Now you can add the viewModes in which this specific field should be locked in. Locked means that the user viewing the e-form will be able to read the content of the field but not edit the content.


At this point you must have a strategy for how you want your e-form to behave in your process application so make sure that you have answered a couple of questions.


1. Which fields do you wish to have in your e-form for your entire process application?

2. Which fields in the e-form belong to which viewMode?

3. How should each field behave in every defined viewMode?


All of these answers require you to have some sort of design done for your e-form and process application. Barium Best Practice is that you do create a process application following these five steps. Working iteratively is a quick way to get ahead and to ensure that you don't complicate things.


1. Create your process model.

2. Make the process runnable and test run your process applications flow.

3. Design your e-form on paper, later in the e-form designer.

4. Update your process application and test run with an e-form without viewModes.

5. Add viewModes and test run again.


For the purpose of this quick guide though, let’s continue from where we are right now.


16. In the attribute Value field lockInViewModes for our field Instance Name we need to define which viewModes this field should be locked in. You do this by simply writing the viewModes in the value field with commas separating them (if you want the field to be locked in more than one viewMode.


In this case you want the field Instance Name to be editable when starting the process but locked for the reviewer and the performer. Therefore add the text REVIEWER,HANDLE in the Value field and hit Enter on your keyboard.




17. Do the exact same thing for the fields Description and Registered date in your e-form.


18. Add two more forms to the e-form, one for the reviewer to be able to add comments and one for the performer to be able to add comments on how the case has been handled.


Click on the little arrow to the left of the folder called fields.



Drag and drop two Textarea fields to your e-form.


19. Change the fieldLabel on each Textarea to Reviewer comment and Performer comment. Add a width attribute with the value 50% to both Textareas.


20. Click inside the Textarea field called Reviewer comment and add the attribute hideInViewmodes, then write CREATE in the Value field.


21. Click inside the Textarea field called Performer comment and add the attribute hideInViewModes and add the CREATE,REVIEW in the Value field.




22. Save your e-form.


23. In order for your changes to show when running the process, you must upgrade your process application to the latest published version of the process model.


To do so, click on Process apps under Run.


24. Double click on your process application called My first application with an e-form.


25. Click on Application configuration.



26. You are now in the Application Configuration view. Click on Upgrade to the right.



27. In the drop-down list you can see every version of the process model. Choose the very latest version (which you have just modified) and click Ok. If you haven't published, or even checked the process in, this will happen automatically.



28. Now you’re done! To try out the new version of the process click on the green start symbol in the top right hand corner. The text says Start unless you changed the name of the start event when modeling.




TIP: See how participants usually start instances in the article Start new process instances.


29. Now you can see that the e-form shown is in the viewMode called CREATE and that the e-form fields that we added are not shown. Fill out the e-form fields and click on Start.



30. From your inbox My tasks, double click on the task called Task 1.



31. Looking at the e-form you should see that the e-form fields filled out in the CREATE viewMode are now locked since you are viewing the e-form in the viewMode REVIEW.



Add a comment and complete the task by performing the action Complete task.


32. Continue completing the process from your inbox and see the result of the viewModes added to your e-forms.


You have successfully completed creating your first process application containing a process-aware e-form. Remember that you can combine multiple e-forms in a process application that all have viewModes set to them.


Happy process running!