Versions Compared

Key

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

Status
colourYellow
titlenewIn Progress

Table of Contents

General Description


This example shows the user how to use the ProcessMaker I/O API API for a common business process present in most organizations.

Onboarding Process Example

This example 

...

diagram describe the onboarding process for a new customer.

The process diagram defined below will conduct a tracking of all onboarding requests for the integration project.

Process Scheme



Participants

Process name

DescriptionRequester

Main process

The user who requests a day offApprovercompany for the onboarding process

Supervisor

A user or group of users who have has permission to approve a day off in the company

Slack Action Receiver

The technical process for receiving and processing button responses from Slack

Process Items

The tasks in the process are listed in the table below:

...

Task

...

Type

...

Process

...

Connector

...

Description

...

Time Off Request

...

Start Event

...

Requester

...

 

...

Starts the Requester process

...

Initiate SlackBot

...

Script Task

...

Requester

...

 

...

This technical task runs script and sets up the Slack application parameters, such as AppNumber, Dates, Slack bot token and Slack channel name

...

Send Time Off Request

...

Service Task

...

Requester

...

Slack\APIConnector

...

This is where the user requests the time off.

...

Slack Request Sent

...

Intermediate Message Event

...

Requester

...

 

...

This message event sends the request for approval

...

Approve Request

...

Start Message Event

...

Approver

...

 

...

This start event is initiated by the Slack Request Sent message event and launches the approver process

...

Slack Response Received

...

Start Event

...

Slack Action

...

 

...

This event launches the Slack API when the "Approve" or "Reject" button is clicked

...

Parse Payload

...

Script Task

...

Slack Action

...

 

...

This script decodes json and prepares the data to send in the Slack API response to the approver

...

Get Slack Callback

...

Intermediate Message Event

...

Slack Action

...

CorrelationKeys

...

Gets the callback and sends the Slack response to the appropriate process instance

...

Response Confirmation

...

Service Task

...

Slack Action

...

Slack\SendMessageConnector

...

This connector sends the Slack webhook

...

Get Slack Response

...

Intermediate Message Event

...

Approver

...

 

...

When the approver gets the response from the Slack webhook, the approver can continue with the approval process

...

Send Approval/Send Decline

...

Service Task

...

Approver

...

Slack\APIConnector

...

This is where the approver makes a decision

...

Send Confirmation Request Accepted

...

Service Task

...

Requester

...

Slack\SendMessageConnector

...

This is where the requester gets a message notifying them that their request is being reviewed

...

Decision Made

...

Intermediate Message Event

...

Requester

...

CorrelationKeys

...

This message event sends a notification to the requester with the approver's decision

Messages

All messages is sending via email connectors 

...

Message Title

...

Task

...

Location

...

Content

...

Notification to approver

...

Approve Time Off

...

Channel

...

Hello UserFullname
A new request for time off has been initiated by RequestorFullname
{RequestorFullname} has requested to take time off from TimeOffDateStart}) until {{TimeOffDateEnd. That would mean a total of TotalTimeOff days off. 
Would you like to Approve or Reject this request? 
Note: To approve or reject the request, please click on the appropriate text above, or you may type either "/pm-route 253 approve" to approve the request, or "/pm-route 253 reject" to reject the request.

...

Approval notification to requestor

...

Approve Time Off

...

Private Message

...

Hello RequestorFullname
We just wanted to let you know that you have the best boss in the world! 
Your request for time off, from TimeOffDateStart until TimeOffDateEnd has been approved! 
For your records, the case number is AppNumber
Enjoy your time off!

...

Rejection notification to requestor

...

Approve Time Off

...

Private Message

...

Hello RequestorFullname
We regret to inform you that you have a bad boss! 
Your request for time off has been rejected. 
For your records, the case number is AppNumber
Better luck next time!

...

New case note

...

All

...

Private Message

...

Hello UserFullname
We just wanted to let you know that there has been a new case note added to case number AppNumber
See below for the full note. 
"CaseNote_Content"

Getting Started with example

To work with MVP example click on a top navigation tab labeled “Onboarding Example” on the Examples portal.

It will be selected by default when you open up the page at the first time. Top navigation will present a steps available for the selected example. 

Please refer to “Readme”, “Import”, and “Process List” sections to import BPMN file with the process.

Users 

...

stop the onboarding process if something is wrong

Requester

A user who requests the onboarding process into the company

Activities

Activity name

Activity type

Activity description

Forms

Manual requestEmpty start event

Requester asks about new access and fills out the manual request form.

Manual Request
API requestMessage start event

Onboarding process can be started from 3rd part API.


Record customerUser task

In this form the user needs to define the workflow requirement.

Record Form (Google Form)

Validate Workspace

User taskThis task is for the validators, they need to define 2 main aspects:
  1. Requested workspace ID is not taken
  2. A valid license file should be uploaded
Validate Workspace form

Create Production Workspace

Create Sandbox Workspace

Create Development Workspace

Service taskThese tasks can be performed, depending on the initial request, to create the workspace with requested information.


Generate SummaryScript taskThis activity is executed by ProcessMaker I/O engine, and is a script to generate a PDF with the information about the workspaces and credentials.
Verify Onboarding DataUser taskThis activity is created to validate that the same user has approved all information generated by the other activities.Verify Onboarding Data


Messages

Message Title

Item

Type

Content

Notification to requester

"Verify Onboarding Data" User Task /Notify Requester Message event

email message

Hello {{Requester name}},

You request was approved and implemented.

A workspaces for {{ClientName}} was created

Please find the summary document with Credential report in the attachment

Best regards!

Notification to supervisors

"Validate workspace" User task /Notify Supervisor Message event

email message

Hello {{Supervisor name}},


We just wanted to inform you, that {{Requester name}} request for creating workspaces for {{ClientName}} wasn't validated during dedicated time 

Best regards!





Documents

Document name

Item

Type

Template

Credential report

Generate Summary

pdf

Credential report


Getting Started with Use Case

How to Launch an Instance* of ProcessMaker I/O

*ProcessMaker I/O is designed to be installed in the cloud, so in this document an instance refers to an installation of ProcessMaker in a virtual machine or a container.

If you don't have a ProcessMaker I/O instance yet, please:

  1. Go to the Instance page.
  2. Click Create an Instance and follow the instructions provided.


If you already have a ProcessMaker I/O instance, please:

  1. Launch an instance of ProcessMaker I/O on the Instance page.
  2. Copy/remember the instance URL link, these will be required later
  3. Click on Form examples link
  4. Switch to Onboarding on the top
  5. Download Onboarding BPMN file  on your computer
  6. Click on Import tab on the top left and upload BPMN file from your PC. 

Users 

For this specific example you will need three users:

“Test” - it This user already exists in your Instance instance by default and its Access Token is already access token has been pre-filled in all the forms.

“Alice” and “Bob” - these These users should be created manually by issuing a set of API calls (Refer to PHP-SDK documentation about creating a user and obtaining access tokens). After creating the users - , their access tokens should be entered into the form once. Afterwards these keys will be stored in the browser cookie.

During process execution you can monitor your Process Instances and its status using “Process List” page.

Forms

Manual Request

This is a jQuery form which will trigger the “Manual Request” event for the Process. Fill in the form and press the “Create new client” button. This , this will send a JSON API request to the appropriate PM.IO API endpoint. To ensure your Process Instance was created, you may use can check the “Process List” feature.

To see the details of the request/response - you may can use the “Show Request” and “Show Response” buttons in Logging section. This will reveal the full details about communication communications with the API endpoint.


Google Form

This is a Google Form implementation which have has the same functionality as the “Manual Request” jQuery form. Please note - this form is just a sample and will require a manual adjustment on your Google Forms account. To use the form you need to copy the form to your Google Forms account, change API endpoint URL and Authorization authorization token in Google Script (attached to the form), then set-up Form the form triggers. 


Record Customer

This is a jQuery implementation to support User Task names the user task named “Record Customer”. It will find a the delegated user task data for a specified user (Refer refer to the selected user on the top-right) and pre-fill form inputs.

Please note the MVP example delegate delegates the “Record Customer” User Task user task to the user named “Test”, so be sure the proper user is selected on top-right of the page.

When you filled fill in the form you may , press the “Create workspace” button which will to form the JSON API request and send it to the API endpoint, passing the data and moving User Task the user task into a COMPLETED state. Process Instance The process instance will be processed by the PM.IO engine further , according to the BPMN scheme.

To see the details of the request/response - you may can use the “Show Request” and “Show Response” buttons in Logging section. This will reveal the full details about communication communications with the API endpoint.


Validate Workspace

This is a jQuery implementation to support User Task names the user task named “Validate Workspace”. It will find a the delegated user task data for a specified user (Refer refer to the selected user on top-right) and pre-fill form inputs.

Please note the MVP example use uses round-robin delegation mechanics for the “Validate Workspace” User Taskuser task, so your form will be delegated and being will be accessible to either to Alice or to Bob, depending on your case.

To see the details of the request/response - you may can use the “Show Request” and “Show Response” buttons in Logging section. This will reveal the full details about communication communications with the API endpoint.


Verify Onboarding Data

This is a jQuery implementation to support User Task names the user task named “Record Customer”. It will find a the delegated user task data for a specified user (Refer refer to the selected user on top-right) and pre-fill form inputs.

Please note the MVP example delegate delegates the “Record Customer” User Task user task to the user named “Test”, so be sure the proper user is selected on top-right of the page.

To see the details of the request/response - you may can use the “Show Request” and “Show Response” buttons in Logging section. This will reveal the full details about communication communications with the API endpoint.