This page describes how to create a simple application in the Emakin BPM.
We will start to design "Expense Form".
1- Create Process Folder
- Click "All Folders" button on the left-side of the screen; click new folder,
- Enter "Expense Management" name in to folder name and choose the type of folder. Click the "Ok" button, "Ok" button is found in the bottom-hand side of the pop-up.
- Click the processes button on the top of the screen, enter "Expense Management" name in to process name, click "ok" button.
- Click the edit button, below the versions title. Process folder will open on the new screen.
2- Process Diagram
The process diagram is design section of process. A process diagram is a visualized model consisting; diagram overview, pools, tasks, action and roles.
2.1 Create The Pool
- Click the plus ikon below the pools title. New pool and pop-up will open under the pools title.
- In the pop-up, set the pool features.
- Enter the "Expense Form" name in to name field.
- Choose the data root in the select list.(????)
- If you click the "Is Administrative ? " button, this pool enabled to only process administrator.
- If you click the "Is Anonymously Accessible ?", this pool enabled to anonymous users.
- Enter the documentaion URL (Example: wiki.emakin.com) in to documentation URL field.
- Enter the support URL (Example: http://destek@kalsiyum.co) in to support URL field.
- Click the "Ok" button, "Ok" button is found in the bottom-hand side of the pop-up. Diagram overview screen will open on the same screen.
- Click the plus ikon below the roles title. New role and pop-up will open under the roles title.
- In the pop-up, set the roles features.
Role 1:
- Enter the "Accounting Specialist" name in to name field.
- Click the close button, "close" button is found in the bottom-hand side of the pop-up.
Role 2:
- Enter the "Accounting Manager" name in to name field.
- Click the close button, "close" button is found in the bottom-hand side of the pop-up.
Expense form application will run within three task steps so we will design three task in the diagram overview step.
- Task ; Expense Form
- When the diagram overview screen opened, you will see expense form headed task.
- Click the this task, task property fields screen will open in the right - hand side of the diagram overview screen.
- Choose the type of normal below type title.
- Choose the start point of yes below the "is start point" title.
- Click the action field on the task.
- Enter the "Submit" name in the first action field.
- Enter the "Avoid" name in the second action field.
- Click the task, task property fields screen will open in the right - hand side of the diagram overview screen.
- Select the "Accounting Specialist" below the role title.
2. Task ; Approve
- When you click "Submit" button, "Add new task" button will be seen on the screen.
- Click on "Add new task" button, new task will be seen on the screen.
- Enter the "Approve" name in to task property fields screen.
- Click the action field on the task.
- Enter the "Approve" name in the first action field.
- Enter the "Reject" name in the second action field.
- Click the task, task property fields screen will open in the right - hand side of the diagram overview screen.
- Select the "Accounting Manager" below the role title.
3. Task ; Accounting Records
- When you click "Approve" button, "Add new task" button will be seen on the screen.
- Click on "Add new task" button, new task will be seen on the screen.
- Enter the "Accounting Records" name in to task property fields on the screen.
- Click the action field on the task.
- Enter the "Save" name in the first action field.
- Click the task, task property fields screen will open in the right - hand side of the diagram overview screen.
- Select the "Accounting Specialist" below the role title.
- Click the "Reject" action, you will see red point near the action field.
- Click the red point then move the mouse, red point color will be changed to pink and a long arrow will be seen on the screen.
- Bring the arrow near the "Expense form" task left side and also you will see pink point on there. Put the arrow to pink point on the task.
3- Data Model
Data models define how data is connected to each other. Emakin BPM uses data model connections in the forms.
Create Data Model
We will compose four form part in data model.
- Click the data model step below the unknown title. Data model design screen will open on the same screen. You will see your application name below the elements title.
- Click details button below "expense form" title.
1.Part: Owner Section
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "Owner" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "Owner" element.
Create Elements of Owner Section:
- 1 Identity
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema. Look at ->namespaces title.
- Choose the type below type title.
- Select the type of identity.
- Enter "Identity" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "ıdentity" element.
- Click "Add New Elements" button, on the same line identity element.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of string.
- Enter "Department" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Department" element.
2.Part: Form Information Section
- Click "Add New Elements" button under the owner title, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "FormInformation" name in to name field.
- Choose the "Yes, use multiple copies" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "FormInformation" element.
Create Elements of Form Information Section:
2.1 Date Element
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of date.
- Enter "Date" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Date" element.
3.Part: Expense List Section
- Click "Add New Elements" button under the form information title, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "ExpenseList" name in to name field.
- Choose the "Yes, use multiple copies" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "ExpenseList" element.
Create Elements of Expense List Section:
3.1 Expense Section
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
- Select the type of container.
- Enter "Expense" name in to name field.
- Choose the "Yes, use multiple copies" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "Expense" element.
3.1.1 Reason Element
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
- Select the type of string.
- Enter "Reason" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Reason" element.
3.1.2 Expense Group Element
- Click "Add New Elements" button, under the reason element.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "ExpenseGroup" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "ExpenseGroup" element.
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
- Select the type of string.
- Enter "Name" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Name" element.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
Select the type of number.
Choose the "No, use only one element" below "Is list Item?" title.
Enter "Id" name in to name field.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Id" element.
- Click "Add New Elements" button below the receipt information element, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of number.
- Enter "CrossRate" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "CrossRate" element.
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of number.
- Enter " ConvertedAmount" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "ConvertedAmount" element.
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of date.
- Enter "Date" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the " Date" element.
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of number.
- Enter "Amount" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the " Amount" element.
3.1.7 Unit Element
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "Unit" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "Unit" element.
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
- Select the type of string.
- Enter "Name" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Name" element.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
Select the type of number.
Enter "Id" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Id" element.
3.1.8 VAT Element
- Click "Add New Elements" button, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "VAT" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "VAT" element.
- Click "Details" button, add new elements button will appear below the details button.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
- Select the type of string.
- Enter "Name" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Name" element.
- Click "Add New Elements" button, elements design window will open.
- Choose the type below type title.
Select the type of number.
Enter "Id" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button and add new element button will appear under the "Id" element.
4.Part: Note Section
- Click "Add New Elements" button under the expense list title, elements design window will open.
- Select the standart types below the target schema.
- Choose the type below type title.
- Select the type of container.
- Enter "Note" name in to name field.
- Choose the "No, use only one element" below "Is list Item?" title.
- Click the done button, "Done" button is found in the bottom-hand side of the window. Edit button, details button and add new element button will appear under the "Note" element.
4- Namespaces
Namespaces list allows to import data models or assign prefix for used namespaces.
- Click the namespaces step below the unknown title. Namespaces design screen will open the new screen.
- Click the "add new namespaces".
- Enter the "Identity" name in to prefix field.
- Enter the "http://schemas.emakin.com/forms" address in to Namespace URI field.
- Enter the "http://schemas.emakin.com/forms" address in to XML Schema Location field.
- Click the "done" button, "Done" button is found in the bottom-hand side of the window.
5- Forms
Form part creates a preset forms for an interface. This part uses data model part properties.
- Click on the "Expense Form" section below the pools title. Diagram overview screen will open on the same screen.
- Click the plus button under the forms title.
- Enter "Expense Form" name in to name field.
- Click on "Expense Form" section, form design page will appear as an empty screen.
- Click on the first row, design table will appear in the right-hand side of form design screen and design tools will appear under the row, those are cut, xml and add new.
- Click "add new" button. Select "ExpenseForm" element and row content design, rules and date sections will appear in the right-hand side of form design screen and design tools will appear under the row, those are cut, copy, delete, xml, convert and columns.
- Select the type of section below the design title.
- Click on row and design tools will appear under the row, those are cut, copy, delete, xml, convert and columns.
Owner Section Design:
- Click "add new" button, select owner. Design tools will appear under the row, those are cut, copy, delete, xml, convert and columns. Select the type of section below the design title.
- Click "columns" button and choose second one.
- Click on first part below the owner field and click on "add new" button then select again owner element.
- Click on row below the second owner, click "add new" button and select "Identity" element.
- Click on identity element, you will see identity picker part in the right-hand side of form.
- Click on mappings sub title below the identity picker title, click on "add new". You will see source and target title.
- Enter the "Employee.Department.Name" in to source field. Enter the "Department" in to target field. Click "Done" button.
- Click on second part below the owner field and click on "add new" button then select again owner element.
- Click on row below the second owner, click "add new" button and select "Department" element.
- Click department title field and click second grid around this field. You will see design and data title in the right-hand side of form.
- Select width of "6 Column - 1/2" .
Form Information Section Design:
- Click owner title field and click second grid around this field. Click on "add new" button then select form information element.You will see "form information" element below the owner. Design tools will appear under the row, those are cut, copy, delete, xml, convert and columns. Select the type of section below the design title.
- Click on row below the form information, click "add new" button and select "FormInformation" element.
- Click on row below the form information, click "add new" button and select "Date" element.
- Click Date title field and click second grid around this field. You will see design and data title in the right-hand side of form.
- Select width of "3 Column - 1/4" .
Expense List Section Design:
- Click owner title field and click second grid around this field. Click on "add new" button then select expense list element.You will see "form information" element below the owner. Design tools will appear under the row, those are cut, copy, delete, xml, convert and columns. Select the type of section below the design title.
- Click on row below the form information, click "add new" button and select "ExpenseList" element. Design tools will appear under the row, those are cut, copy, delete, xml, convert and add new.
- Click "add new" button six times. You will see seven fields below the expense list title. Those fields caption will be "empty".
- Click first empty row, click "add new" button and select reason element.
- Click tsecond empty row, click "add new" button and select expense group element.
- Click on convert button under the expense group field, select dropdown property.
- Click on data sources title, click "add new" button below the data sources and select Static List Item.
- Click edit button near the static list item. Static list item window will open.
- Click add new button and enter the Vehicle in to text field, enter the "1" in to value field.
- Click add new button and enter the Service in to text field, enter the "2" in to value field.
- Click add new button and enter the Energy in to text field, enter the "3" in to value field.
- Click add new button and enter the Communication in to text field, enter the "4" in to value field.
- Click add new button and enter the Fees in to text field, enter the "5" in to value field.
- Click on "Ok" button, "Ok" button is found in the bottom-hand side of the window.
- Click third empty row, click "add new" button and select date element.
- Click fourth empty row, click "add new" button and select amount element.
- Click empty area under the amount field and paste the "Sum:{{sum(//MasrafFormu/MasrafListesi/Masraf/Tutar)}}".
- Click fifth empty row, click "add new" button and select unit element.
- Click on convert button under the unit field, select dropdown property.
- Click on unit field, drop down section will appear in the right-hand side of form.
- Click on data sources title, click "add new" button below the data sources and select Static List Item.
- Click edit button near the static list item. Static list item window will open.
- Click add new button and enter the USA Dollar in to text field, enter the "1" in to value field.
- Click add new button and enter the Euro in to text field, enter the "2" in to value field.
- Click add new button and enter the Turkish Lira in to text field, enter the "3" in to value field.
- Click on "Ok" button, "Ok" button is found in the bottom-hand side of the window.
- Click sixth empty row, click "add new" button and select VAT element.
- Click on convert button under the VAT field, select dropdown property.
- Click on VAT field, drop down section will appear in the right-hand side of form.
- Click on data sources title, click "add new" button below the data sources and select Static List Item.
- Click edit button near the static list item. Static list item window will open.
- Click add new button and enter the "10" in to text field, enter the "1" in to value field.
- Click add new button and enter the "18" in to text field, enter the "2" in to value field.
- Click add new button and enter the "8" in to text field, enter the "3" in to value field.
- Click on "Ok" button, "Ok" button is found in the bottom-hand side of the window.
- Click on expand button near to reason element. New row will open, click on the row.
- Click "add new"button, select "CrossRate" element.
- Click cross rate title field and click second grid around this field. You will see design and data title in the right-hand side of form.
- Select width of "5 Column - 5/12" .
- Click cross rate title field and click second grid around this field. Click on "add new" button then select again expense element.
- Click on row below the expense, click "add new" button and select "ConvertedAmount"element.
- Click converted amount title field and click second grid around this field. You will see design and data title in the right-hand side of form.
- Select width of "5 Column - 5/12" .
Calculate the converted amount:
- Click on the "Expense Form" section below the pools title. Diagram overview screen will open on the same screen.
- Click expand bottun on the expense form. Select the script.
- Paste the following code on the script page.
$Xml.Live('//ExpenseList/Expense/CrossRate', function() {
this.SetValue('../ConvertedAmount', this.EvaluateNumber() * this.EvaluateNumber('../Amount'));
});
$Xml.Live('//ExpenseList/Expense/Amount', function() {
this.SetValue('../ConvertedAmount', this.EvaluateNumber('../CrossRate') * this.EvaluateNumber());
});