Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
titleready

...

During process execution you can monitor your Process process instances and the status of these instances using the “Process List” page. (Juliya Zagoruyko (Unlicensed): Is this the "Process List" or the "Processes" page in the PM I/O dashboard? - yes, this is process list tab on the Environment details)their statuses from the Processes page.

Getting Started with the Use Case

...

If you don't have a ProcessMaker I/O Environment yet, do the following:

  1. Log on to your ProcessMaker I/O account. If you do not have a free ProcessMaker I/O account, please create one.
  2. Click the Environment page on the top menu.
  3. Click the Create Environment button, and then follow the instructions provided.

If you already have a ProcessMaker I/O Environment, do the following:

  1. Log on to your ProcessMaker I/O account.
  2. Click the Environment page on the top menu, and then run a ProcessMaker I/O Environment.
  3. Copy the Environment URL link to remember it for later; this URL is required later as your-environment-url (for example, "your-environment-url" is "MYENVIRONMENT.api.processmaker.io", where "MYENVIRONMENT" is your "Processmaker I/O Environment name").

Start with an NDA Use Case

  1. Click on the Form examples link.
  2. Switch to Click the Environment name to display information about it.
  3. From the Info tab, click the Example: Click to open link to display the ProcessMaker I/O Examples Portal.
  4. From the left menu, click the NDA Agreement Signing Process tab on the left menu.
  5. Download nda.bpmn to your computer. (Louis note: This seems to be the current name of the bpmn file.)
  6. From the ProcessMaker I/O  tab.
  7. Click on the NDA BPMN file link to download the BPMN file to your computer. You will use this BPMN file for this use case.
  8. From your Environment, click on the  Import tab, and then Import tab, and then click the Choose File button to upload the BPMN file from your computer.
  9. Go to the Environment's Processes tab. Delete the processes there by clicking on their ID button, if necessaryClick the Processes tab, and then click the ID button for all displayed processes to ensure no processes are in your Environment.

Set Up Credentials for Google Drive

  1. Log on to your Google account and then go to this website: https://console.developers.google.com/.
  2. Create a new project by clicking the My Project drop-down at the top of the page, as noted in the graphic below. (Juliya Zagoruyko (Unlicensed): The arrow in the graphic is pointing to "Create project", not "My Project". Is this pointing to the wrong GUI element in the screenshot? - everything is correct. "My project" is the top menu (new Google logo)Alt text hereAfter you enter a name, it takes a few seconds before the project is successfully created on the server. Make sure you have the project selected at the top.
  3. Under Google Apps APIs, go to Library, and then click on Drive API under Google Apps APIs (as noted in the graphic below).Alt text here
  4. Click Enable to enable the Drive API, as noted in the graphic below.Alt text here
  5. Go to Credentials and then click on the Auth Consent Screen tab. Enter the Product name shown to users field, and then click the Save button (as noted in the graphic below). Ignore the other fields.Alt text here
  6. Create the Credentials with OAuth.
  7. Go back to Credentials, click the Create Credentials button, and then select OAuth Client ID (as noted in the graphic below).Alt text here
  8. Choose Web Application and then enter a name (as noted in the graphic below).
  9. Enter your authorized redirect URIs, preferably to your test URL (http://mysite.dev) and your production URL (https://mysite.com). Alternatively, create a separate production key later. Also add https://developers.google.com/oauthplayground to your redirect URLs temporarily, because you will need to use it in the next step.Alt text here
  10. Click Create and then take note of your Client ID and Client Secret.
  11. Get your Refresh Token Now head to https://developers.google.com/oauthplayground. (Juliya Zagoruyko (Unlicensed): I don't understand what Step 11 is saying. I don't see this GUI element in any screenshots here.  - I removed first part, now it's clear )
    Make sure you added this URL to your authorized redirect URIs in the previous step.
  12. In the top-right corner, click the settings icon, check Use your own OAuth credentials, and then paste your Client ID and Client Secret (as noted in the graphic below).Alt text here
  13. In Step 1 on the left, scroll to Drive API v3, expand it, and then check each of the scopes (as shown in the graphic below).Alt text here
  14. Click the Authorize APIs button and allow access to your account when prompted.
    Please note, during this step your account must be pre-approved by Google to use OAuth keys. You must fill in the form https://support.google.com/code/contact/oauth_app_verification if you are going to use the app only for personal verification purposes. Please refer to the form section Apps for testing or personal use only.
  15. When you get to Step 2, check Auto-refresh the token before it expires and click Exchange authorization code for tokens (as shown in the graphic below).Alt text here
  16. When you get to Step 3, click on Step 2 again to display your refresh token.Alt text here

...

function myFunction(e) {
 var host = "pm instance host";
 var token = "access_token_for_instance"; (Louis question: Should this now read "access_token_for_environment"?)
 var datamodel={};
 //Setting up google drive credentials
 datamodel.client_id = "google_drive_client_id";
 datamodel.client_secret = "google_drive_client_secret";
 datamodel.refresh_token = "google_drive_refresh_token";
 var headers =
     {
       "content-type": "application/json",
       "Accept": "application/json",
       "authorization": "Bearer "+token
     };
 var trigger_event_url = "https://"+host+"/api/v1/processes/"+"Requester"+"/events/"+"NDA%20form%20request"+"/trigger";
 var formResponse = e.response;
 var itemResponses = formResponse.getItemResponses();
 var replacement_array = {};
 for (var i=0; i<itemResponses.length; i++) {
   var key = itemResponses[i].getItem().getTitle();
   if (key == 'Name') {
     datamodel.RequesterName = itemResponses[i].getResponse();
     replacement_array.RequesterName = datamodel.RequesterName;
   }
   if (key == 'Address') {
     datamodel.RequesterAddress = itemResponses[i].getResponse();
     replacement_array.RequesterAddress = datamodel.RequesterAddress;
   }
   if (key == 'E-mail') {
     datamodel.RequesterEmail = itemResponses[i].getResponse();
   }
   if (key == 'Passport or ID number') {
     datamodel.RequesterID = itemResponses[i].getResponse();
     replacement_array.RequesterID = datamodel.RequesterID;
   }
   if (key == 'Phone number') {
     datamodel.RequesterPhone = itemResponses[i].getResponse();
     replacement_array.RequesterPhone = datamodel.RequesterPhone;
   }
   if (key == 'Choose NDA template') {
     datamodel.template = itemResponses[i].getResponse().toLowerCase();
   }
   if (key == 'Company name (for Customer)') {
     datamodel.RequesterCompanyName = itemResponses[i].getResponse();
     replacement_array.RequesterCompanyName = datamodel.RequesterCompanyName;
   }
  }
 datamodel.replacement_array = JSON.stringify(replacement_array);
 datamodel = JSON.stringify(datamodel);
 //Making our request body
 var data = {
   'data': {
     'type':'data_model',
     'attributes': {
       'content':datamodel
     }
   }
 };

 data = JSON.stringify(data);
 Logger.log(data);
 var options =
     {
       "content-type": "application/json",
       "method": "POST",
       "headers": headers,
       "payload": data
     };


 var response = UrlFetchApp.fetch(trigger_event_url, options);
 Logger.log(response.getContentText());
}

...

  • permission_list: Array of users with roles and types in JSON format (required). Example:

     [
      {
      "sendNotificationEmail":false,
     "role":"reader",
     "type":"user",
     "emailAddress":"oleg@processmaker.com"
      },
     {
     "sendNotificationEmail":false,
     "role":"reader",
      "type":"user",
     "emailAddress":"egor@processmaker.com"
      }
     ]
    

Supports the following roles: organizer, owner, writer, commenter, reader.

...

  • To: requester email address (required)
  • Body: email text (Notification to requester) (required)
  • To_name: requester full name (required)
  • Subj: email subject (required)
  • Options: options to log mail driver actions to the log file (required) (Juliya Zagoruyko (Unlicensed): What are these options? Should we document them? - its log options)

No output parameters.

NDA Agreement Signing

...

: Process Description and Scheme

In this use case, a user wants to do business with another company. This other company a company that requires an NDA form be signed as part of its standard procedures; for . For example, this could be a potential new the signed NDA might apply to a new potential business partner or employee.

The process steps Workflow for this use case are is as follows:

  1. The user fills out a Request/Order form on a website or imaginary company portal to request the NDA.
  2. The company receives the request.
  3. If the NDA request is from a new customer or partner, the process follows the Business path: the company generates an NDA document based on a docx template. If the request comes from a potential employee, then the process follows the Employee path: the company generates an NDA document based on an html template.
  4. The company sends the generated document to the requester via an email with the permission "Only for comment".
  5. The requester reviews the NDA, signs the document, and then sends an email to the company with the signed and scanned NDA in the attachment (external process).
  6. When the company receives the reply from the requester, the document is renamed with the mark "Signed" or "Unsigned" according to its status.

The graphic below shows the BPMN process scheme.

Alt text hereImage RemovedImage Added

Tasks (Juliya Zagoruyko (Unlicensed): Should these step types be all lower-cased? Right now they are a mix of upper and partial lower-case. This is also true for the methods.)

...