Skip to content

Tutorial 2

tomolimo edited this page Sep 7, 2021 · 12 revisions

Here, we'll learn how to configure and run a case from simplified interface (= self-service interface or post-only interface).

We are going to re-use the Tutorial 1 sample.

Let's say that we would like to start a case from 'Tutorial 2' process for a category named '79000 - General' when creating a 'Request' ticket via self-service interface.

In ProcessMaker

  1. Open 'Tutorial 1' process
  2. When in PM Designer, Save as current process
  3. Input new title 'Tutorial 2'
  4. Create a new dynaform, name it 'Sum-up form', and open it
  5. Add a web control 'H1 title', and set label 'Request sum-up'
  6. Add a 'Textarea' web control, and create variable 'UserRequestSumUp' (this name MUST be respected), set display mode to view.
  7. Add a submit button with the special id 'btnGLPISendRequest' (this id MUST be respected), and set label 'Send Request'.
  8. Edit dynaform 'Task 1 form', and export it, then delete submit button.
  9. Add a new task to the process:
  10. Create a custom trigger, name it 'SetUserRequestSumUp' (for example)
    Trigger code is:
@@UserRequestSumUp = "Reminder of the request   
Last name:  ".@@LAST_NAME."  
First name: ".@@FIRST_NAME."  
Age:        ".@@AGE ;  

@@GLPI_ITEM_TITLE = "New user: ".@@LAST_NAME.", ".@@FIRST_NAME;
  1. Create a new dynaform, name it 'Validation form', import previously exported 'Task 1 form' form definition
  2. Select properties of the form itself, and set disply mode to view
  3. Open 'Task 1' task steps definition, drag drop from left side to right the 'Sum-up form' dynaform and order it like on the screencopy. Also drag drop the trigger on the 'Before Dynaform' event of the 'Sum-up form' dynaform.
  4. Open 'Task 2' task steps definition, and drag drop 'Validation form' dynaform from left to right.
  5. Edit 'Assignment Rules' for 'Task 2', and add in 'Assigned users list' group 'Tutorial Group 1'
  6. Save process

In GLPI

  1. Go to 'Setup > Dropdowns' menu and click on 'Ticket categories'
  2. Edit the category you would like to use for the Tutorial 1 process Set 'Visible in the simplified interface' to 'Yes', and 'Visible for request' to 'Yes', and save
  3. Edit the process in GLPI Set 'Ticket type' to 'Request', and 'ITIL Category' to '79000 - General'
  4. Edit 'Authorizations' so that users with a profile authorized on simplified interface will be able to start a case
  5. Start a GPI session using this post-only (or self-service) profile
  6. Create a ticket
  7. Select ticket type 'Request'
  8. Select ticket category '79000 - General', and then the case should start, and you should get:
  9. Fill out the fields and click on the 'next step' link (upper right)
  10. Check that the sum-up reflect what you wanted to input (if not, then click on 'Previous Step', on change your inputs)
  11. Then click on the submit button, and you should get a new ticket, with a task assigned to 'Tutorial User 1'.
    Also check the header tab of the ticket:
    The title and the descrition of the ticket should be the value computed in the trigger.
  12. logout from GLPI, and login with TutorialUser1, You should be able to see in the 'Your planning' the task to be done. click on it, and you should go directly to the task
    The map:

    You may click on the tasks, and you'll get some information about them. The case history:
    The change log (which is a history of the case variables:
    The dynaforms:
    Which you may view by selecting one, and a click on 'Preview'.

Remarks

  1. As a matter of fact, the 'SetUserRequestSumUp' trigger could have been separated into two triggers: one for setting the 'UserRequestSumUp' variable, and one to set the title of the future ticket.
  2. When a process is dedicated to be used in simplified interface, the last step MUST be a dynaform and have a field named 'UserRequestSumUp' (this field may be hidden). The value of this variable can be set in a trigger or by any possible means.
  3. When in a task, there are several steps (or dynaforms), only the last one MUST have the button with the special id 'btnGLPISendRequest'.