Академический Документы
Профессиональный Документы
Культура Документы
Page 2 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Contents
1.. Introduction .....................................................................5
2.. Obtaining a Template from Google Docs ...........................6
3.. Creating an Application ....................................................7
4.. Building a Form ................................................................8
4.1 . Adding Fields to the Form Layout .................................. 9
4.2 . Creating the Travel Expenses Section .......................... 11
4.3 . Adding More Fields to the Form Layout ......................... 13
4.4 . Creating the Approval Details Section .......................... 13
4.5 . Checking in the Form ................................................. 14
5.. Publishing an Application ...............................................15
6.. Registering Access Details for Google Apps ....................15
6.1 . Accessing the Setup Tab ............................................ 15
6.2 . Registering a Personal Account ................................... 16
7.. Registering the Document Template ..............................17
7.1 . Mapping the Document Template ................................ 17
8.. Setting up Organization Data .........................................22
8.1 . Creating Application Users .......................................... 22
8.2 . Creating Roles .......................................................... 24
8.3 . Creating Groups ........................................................ 25
9.. Building a Business Process ...........................................27
9.1 . Adding the Start Element ........................................... 28
9.2 . Adding the Claim Approval by Manager Activity ............. 29
9.3 . Adding the Notify User of Approval Status Activity ......... 31
9.4 . Adding the End Element ............................................. 32
9.5 . Defining a Start Event ................................................ 32
9.6 . Checking In the Business Process ................................ 34
10. Generating URLs for Google Gadgets .........................34
10.1 My Docs .................................................................. 34
10.2 My Tasks ................................................................. 35
10.3 My Notifications ....................................................... 35
11. Adding Google Gadgets to iGoogle .............................36
11.1 Adding Gadgets to the Sales Executive’s Account ......... 36
11.2 Adding Gadgets to the Manager’s Account ................... 38
12. Creating an Expense Claim in Google Docs ................38
13. Sending the Expense Claim for Approval ....................40
14. Approving the Travel Expense Claim ..........................41
Page 3 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 4 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
1. Introduction
In this advanced tutorial, you will see Cordys Process Factory’s easy integration capabilities with the
Google Apps cloud services. This tutorial guides you through using a Google spreadsheet for creating
a travel expense claim using Cordys Process Factory to submit the claim for approval, approve the
claim, and be notified of the claim approval.
To achieve this, you need to first obtain the Travel Expense Report template from Google Docs and
then register and map the template through Cordys Process Factory. Then, you can build the Travel
Expense Claims application; set up the required organization data such as application users, roles,
and groups; and build a business process to route the travel expense claim for approval. You also need
to generate URLs for a few Google gadgets and add these gadgets to your iGoogle home page.
After performing all of the above steps, you can use these gadgets to submit an expense claim for
approval, approve the claim, and be notified of the claim approval.
Objectives
Obtain, register, and map a Google document template in Cordys Process Factory. Build an
application with a form, organization data, and a business process. Generate URLs for Google gadgets
and add the gadgets to iGoogle. Use the gadgets to submit and approve travel expense claims.
Page 5 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
5. Click Use this template. A new browser window appears, displaying a copy of the spreadsheet
template and the template is added to your Google Docs home page with the name Copy of
travel-expense-report.
6. Close the open browser windows and go back to your Google Docs home page.
Page 6 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
7. On your Google Docs home page, right-click the template that is copied to your account and
click Rename. Rename the template to “Travel Expense Report Template”.
8. Click the renamed template. A new browser window appears, displaying the template.
9. Copy the template URL that appears in the address bar of the browser to Notepad and close
the window. You will need this URL later to register the template in Cordys Process Factory.
For example, http://spreadsheets.google.com/ccc?key=p0U9K_ORUHdq5zYYN55bzHA&hl=en
10. You can now click Sign Out to sign out of Google Docs.
You have obtained a template from Google Docs successfully.
3. Creating an Application
Now, you need to register the Travel Expense Report template in Cordys Process Factory. Before
you do so, you need to build an application. Let us first log into Composer and create an application.
You can get the URL and login credentials to access the Composer tool from the email you received
from Cordys Process Factory.
1. Access Composer using the URL that is sent to you via
email.
2. Type the Login Id and Password that are also sent to
you via email and click Login.
The Composer start page appears where you can create
an application from scratch.
3. Select Create a new application.
4. In the Application Name box, type “Travel Expense
Claims”.
5. In the Description box, type “Submit travel expense
claims for approval and reimbursement of expenses.”
6. In the Image drop-down list, select another image or pick your own image, if required.
Page 7 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
4. Building a Form
You can use the Composer Assistant to build the Travel Expense Claim form, which will be sent to
your manager for approval of the travel expenses incurred by you. This form will contain user details
such as your name and group; general details such as purpose and statement number; and travel
expenses incurred by you. It will also contain the approval details of your manager.
1. Click Build Forms on the Composer Assistant and click New Form.
2. In the Form Properties dialog box that appears, do the
following.
a. In the Form Name box, type “Travel Expense
Claim”.
b. In the Description box, type “Provide your personal
details and travel expenses to get approval and
reimbursement of expenses.”
c. Select an Image, if required.
d. Select With a new Application Object for the
Build Form option. This option enables you to build
a form and an application object quickly, at the same
time.
Note: The Composer also enables you to build application objects first and then build forms
using the existing application objects. In this case, you can select With an existing Application
Object to build a form using an existing application object. You can select Without an
Application Object to build a form to only display data, not save data.
e. In the Application Object box, the name of the form appears by default without spaces.
You can type another name for the new application object, if required.
Note: The application object should not contain any spaces or special characters.
f. Click OK. The Form Builder appears, displaying the form layout. You will see a grid with a
number of rows and columns.
Page 8 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Note:
The Field Id and the Form Field Id
are created. These ids differentiate a
field that belongs to an application
object from a field that belongs to a
form.
The Show Label check box is
selected by default. You can clear
this check box if you do not want the
Label Name for this field to be
displayed on the form.
c. Click Done and Add Another. The Purpose field is created and the values are cleared for
another field.
3. Create the Statement No field. In the Field Properties dialog box, do the following.
Page 9 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 10 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
You have successfully added fields to the form layout. An asterisk (*) is displayed next to the label for
some fields since you identified these fields as required fields while creating them. These fields are also
part of the TravelExpenseClaim application object that you are building along with the form.
Page 11 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Note: You can select the Web service option to display Web service output using a Grid section.
d. In the Grid Type drop-down list, Editable is the default selected value. This option
enables you to add data to the Travel Expenses section when the Travel Expense Claim
form is in use.
Note: You can select Navigation if you want to link the Grid section to another form. You can
select Display if you only want to display data in the Grid section.
e. In the No of rows box, the default value is 5, indicating that you can add five rows of data
at a time when the form is in use. Leave the value as 5.
f. Modify the default Width of the Grid section to “600”.
g. Click Done. The section is created.
The TravelExpenses application object is created for the Grid section. You can view the
application object in Used Objects, which lists all the application objects that are used in a
form.
Note: The Line Number field is automatically created in any Grid section. This is mainly to keep track of the
number of rows of data.
1. Create the Date field. Drag the Single Line Text field type from Field Types to the immediate
right of the Line Number field in the Travel Expenses section and drop it when you see a
green line.
2. Similarly, continue creating the following fields in the Travel Expenses section:
a. Description (Field Type: Single Line Text)
b. Transport (Field Type: Decimal)
c. Fuel (Field Type: Decimal)
d. Lodging (Field Type: Decimal)
e. Phone (Field Type: Decimal)
f. Meals (Field Type: Decimal)
g. Entertainment (Field Type: Decimal)
h. Other (Field Type: Decimal)
i. TOTAL (Field Type: Decimal)
3. Click Save at the top of the layout. A notification appears stating that your form is saved. You
can click Close to close the notification immediately. If you do not click Close, the notification
closes by itself in a few seconds.
You have successfully added fields to the Travel Expenses section.
Page 12 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 13 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
d. Click New Value ( ) to add another value for the Select Box. Two boxes appear for you to
type the Display Value and the Database Value respectively.
e. In the new Display Value box, type “Rejected”.
f. Click Done. The Approval Status field is created.
4. Click Save at the top of the layout. A notification appears stating that your form is saved.
You have successfully added fields to the Approval Details section.
2. In the Comment box, type “Created a travel expense claim form”. This is optional.
3. Click OK. A notification appears stating that your form is checked in.
Page 14 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
5. Publishing an Application
When you complete building an application, you can publish the application. Publishing makes the
application available in the list of applications available to you. You can click Change Application to
select the application and then proceed with setup activities for the application and the remaining
composing steps.
1. Click Publish Application on the Composer Assistant. The Publish Application page
appears, displaying the components of the application under Application Summary.
2. Click Publish Application. The application is published.
Note:
If you add a new form to a published application, you need not publish the application again.
After you build the form, check it in, and add it to an application tab, the form is automatically
available for use.
After you publish an application, you can click Send to Production to make the application
production- ready. Then, users can add production data.
Page 15 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
3. In the External App (Personal Access) page that appears, do the following.
a. Click New.
b. Google Apps is the default selected option under External Application Details. This is
the option you need to register your personal access details for Google Apps.
c. Under Access Details, provide your Login and Password that you use to access your
personal Google account.
Page 16 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
d. Click Save.
Your personal Google account is registered to integrate between Cordys Process Factory and
Google Apps.
6. Click Save.
Page 17 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
1. Map the cell in the position C3. This is the cell that stores the value for Purpose in the Travel
Expense Report template in Google Docs. Do the following.
a. In the document template, click the cell in the position C3. The cell position appears in the
Position box on the Cell Mapping tab.
b. On the Cell Mapping tab, click for the Map to box. The All Fields dialog box appears.
The Application Object Field option is selected by default and the TravelExpenseClaim
and TravelExpenses application objects are listed along with the fields that belong to each
object respectively.
c. Select the Purpose field under the TravelExpenseClaim application object and click OK.
The Purpose field appears in the Map to box.
d. In the Record Set drop-down list, leave None as the selected value, indicating that the
mapped cell is not part of any record set.
e. Click Done. The template cell is mapped and highlighted. The cell position and the
application object field that it is mapped to appear in the Position and Mapped To columns
respectively.
Page 18 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
2. Map the cell in the position C4, which stores the value for Statement # in the Travel Expense
Report template in Google Docs. Do the following.
a. Click the cell in the position C4.
b. On the Cell Mapping tab, click for the Map to box, select the Statement No field from
the All Fields dialog box that appears, and click OK.
c. In the Record Set drop-down list, leave None as the selected value.
d. Click Done. The template cell is mapped and highlighted.
3. Similarly, continue mapping the following cells in the template:
Page 19 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 20 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
4. Map the cell in the position B10, which stores the value for Description in the Travel
Expense Report template in Google Docs. Do the following.
a. Click the cell in the position B10.
b. On the Cell Mapping tab, click for the Map to box, select the Description field from the
All Fields dialog box that appears, and click OK.
c. In the Record Set drop-down list, leave Expenses as the selected value.
d. Click Done. The template cells in the Description column from rows 10 to 16 are mapped
and highlighted.
5. Similarly, continue mapping the following cells in the record set.
You have completed mapping the template cells in the Expenses record set.
Page 21 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Do the following.
1. Map the following cells:
Page 22 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Note: If you bought only one user seat from Cordys Process Factory, then you cannot set up any
more application users. In this case, you need to play the role of both the Sales Executive and the
Manager.
Note: If there are existing users in your organization, you can select Add Existing User to the
Application and then select an existing user to whom you want to grant access to the Travel
Approval App by John application.
b. In the Name box, type the full name of the user. For example, “Peter Jones”.
c. Provide the Company Name and required contact details.
d. Assign a privilege to the user to access the Travel Expense Claim application. Click for
the Privilege Name box. The Application Privileges dialog box appears.
Page 23 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
e. Select the Travel Expense Claims Administrator privilege and click OK. The privilege is
assigned. The description of the privilege appears in the Description box.
f. Click Save.
An application user is created and the required privilege is assigned to the user. As soon as the
user is added, he or she receives an email with the Login Id and Password required to log
into Composer. This user will perform the role of a Manager.
Note: In this tutorial, John Anderson is the Sales Executive. This application user is already
created. However, you should add one of your own users as the Sales Executive.
Page 24 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 25 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Note: If you are playing the role of both the Sales Executive and the Manager, you need to
add yourself only once as a member to the Sales group.
Page 26 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Do the following.
i) Click for the User box. The Users dialog box appears, displaying a list of all the users
in your organization.
ii) Select the user to whom you want to assign the Manager role and click OK. For
example, “Peter Jones”.
iii) Click for the Role box. The Roles dialog box appears, displaying all the roles in the
organization.
iv) Select the Manager role and click OK. The selected role appears.
v) Click OK. The responsibility of a Manager is assigned to the user.
Note: If you are playing the role of both the Sales Executive and the Manager, you need to
assign both the roles to yourself.
h. Click Save. The group is created with the corresponding users and their responsibilities.
Page 27 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Note: You can also select the Service Orchestration Only option for Process Type if you do not
want the following elements and activities to be a part of your process, namely, Delay, Send
Message Event, Receive Message Event, and Subprocess.
d. Click for the Application Object box, select the TravelExpenseClaim application object
and click OK. The business process is being built on this application object.
e. Click OK. The business process building environment appears for you to build the process.
Page 28 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 29 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
i) In the Text box, type Approve Travel Expense Claim: and click Insert Field.
ii) In the Process Fields dialog box that appears, the TravelExpenseClaim application object
is listed along with its fields. These are the fields that you added to the Travel Expense
Claim form. This application object is passed to the business process as process input.
iii) Select Statement No and click Insert. The field appears in the Text box. This field will
identify the travel request being sent to the manager for approval.
iv) Click OK. The text appears in the Subject box.
c. In the Message box, type Go to the Approval Details section and approve the request.
d. In the Send drop-down list, Form is the default selected value to send a form along with the
task. The Travel Expense Claim form is being sent by default along with the task as this is the
default form for the TravelExpenseClaim application object.
Note: There is no additional mapping required for this form. If you want to send another form with the
task, you can click to select the form and do the required mapping to identify the instance of the
form to be sent.
Page 30 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
iii) Select Group and click Insert. The field appears in the Field Name box. The business
process will determine which group the manager belongs to based on the value entered in
the Group field during the submission of the travel request.
iv) Click for the Role box. The Roles dialog box appears.
v) Select Manager. This is the role by which the user, who will receive the approval task, is
identified. Click OK. The role appears in the Role box.
The user to whom you want to send the task to approve the travel request is identified.
f. Click OK. The Claim Approval by Manager activity is configured and appears below the Start
element. You can select the activity and move it around to align it correctly.
After you add the Claim Approval by Manager activity, you need to use the Plain Connector
element to connect it to the Start element. Do the following.
a. Select the Start element.
b. Drag the Plain Connector element from
Elements and drop it on the Claim Approval by
Manager activity. An arrow appears, indicating
that the element and activity are connected.
Page 31 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 32 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
On Insert: The business process triggers when a new travel expense claim is submitted.
On Update: The business progress triggers when a travel expense claim is modified.
On Delete: The business process triggers when a travel expense claim is deleted.
Note: If the Start Event button is not visible to you, click and select Start Event.
2. In the Start Event dialog box that appears, the TravelExpenseClaim application object on
which you built the business process is listed.
3. Select the Insert check box for Trigger Event. The After Transaction option is selected by
default for Trigger Rule. This will trigger the business rule after the travel expense claim is
submitted. Click OK. The Start Event is defined.
Note: You can also select the Before Transaction option to trigger a rule according to your business
need.
4. Click Save to save the business process. A notification appears stating that the process is
saved.
The Travel Expense Claim Approval business process that you just built will trigger when a new
travel expense claim is submitted.
Page 33 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
2. In the Comment box, type “Created a travel expense claim approval process”. This is optional.
3. Click OK. The business process is checked in. A notification appears stating that your process is
checked in.
Note: When you define the Insert Start Event for a business process and check in the process, a
system business rule is created automatically. This business rule triggers the business process on
insertion of the application object. In this tutorial, the business process will trigger as soon as a travel
expense claim is submitted.
10.1 My Docs
The My Docs gadget lists all the Google Docs templates registered in Cordys Process Factory for
the logged-in user’s Google account. When you create spreadsheets in Google Docs, these
spreadsheets appear in the My Docs gadget. You can then view a spreadsheet and publish it to
Cordys Process Factory to create an application object instance.
Page 34 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
2. On the Google Gadget URL tab, all the standard gadgets are displayed. Click the My Docs
gadget. The Gadget Details appear on the right. You can modify the Gadget Name and
Height, if required. Authorized Access is selected as the default option for Access Control.
Note: All the standard gadgets require authorized access. After you generate the URL for the gadget
and place it anywhere on the Web, you need to log into Cordys Process Factory through the Google
gadget.
3. Click Generate Gadget URL. The URL for the gadget is generated and appears in a box below.
4. Copy the generated gadget URL and paste it in Notepad. You will need this URL a little later in
the tutorial when you add the Google gadget to iGoogle.
10.2 My Tasks
The My Tasks gadget lists all the tasks assigned to the logged-in user for all the applications that the
user is assigned a privilege to access. You can view the task status, open the task, and complete the
task from within the gadget itself.
10.3 My Notifications
The My Notifications gadget lists all the notifications sent to the logged-in user for all the applications
that the user is assigned a privilege to access. You can view a notification and also delete it from within
the gadget itself.
Page 35 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 36 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
5. In the Type or Paste the URL below box, paste the URL that you copied from Cordys
Process Factory when you generated the gadget URL for My Notifications and click Add.
6. A message appears to inform you that you are adding a gadget that is not created by Google.
Click OK. The My Notifications gadget is added to the Sales Executive’s iGoogle account.
7. Add the My Docs gadget also to the Sales Executive’s iGoogle account. In the Type or
Paste the URL below box, paste the URL that you copied from Cordys Process Factory
when you generated the gadget URL for My Docs and click Add.
8. A message appears to inform you that you are adding a gadget that is not created by Google.
Click OK. The My Docs gadget is added to the Sales Executive’s iGoogle account.
9. Click Back to iGoogle home at the top left corner of the page. You are taken back to your
iGoogle home page where you can view the new gadgets you just added, namely, My Docs
and My Notifications.
Page 37 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 38 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
h. In the next three rows, 14, 15, and 16, remove the 0.00 from the TOTAL column.
i. The subtotal of $3000 appears in the SUBTOTAL field. In the Advances field, type “500”.
The total of $2500 appears in the TOTAL REIMBURSEMENT field. This is the total amount
that needs to be reimbursed to the user who is submitting the travel expense claim.
Page 39 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
You have successfully created a new travel expense claim using Google Docs. You can now sign out of
Google Docs.
5. In the Publish Using Template drop-down list, Travel Expense Report is selected by default
as this is the only document template you registered within Cordys Process Factory.
6. Click Publish. A message appears indicating that the claim was published successfully.
Page 40 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
4. Click the task. A new window appears, displaying the incomplete task with the travel expense
claim form. The total amount that needs to be reimbursed is $2500.
5. In the Approval Details section, select Approved from the Approval Status drop-down list
and then click Complete Task at the top of the window.
Page 41 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
Page 42 of 43
ADVANCED TUTORIAL: WORKFLOW INTEGRATION WITH GOOGLE APPS
4. Click the notification. A new window appears, displaying the notification with the approval
status.
16. Conclusion
Congratulations! You have completed the tutorial successfully. You saw firsthand how you can build a
workflow and integrate it with Google Apps by performing simple configurations and modeling steps.
While following this tutorial, you learnt how to use Cordys Process Factory to build an application,
set up organization data, register your Google account, and register and map a document template
obtained from Google Docs. You also learnt how to generate URLs for Google gadgets, add gadgets to
iGoogle, and use iGoogle to log into the gadgets, publish data to Cordys Process Factory, approve
tasks, and view notifications.
17. Contact Us
To report issues or send feedback, contact us at: support@cordysprocessfactory.com
Page 43 of 43