Book Contents

Book Index

Workflow scripts and parameters

Book Contents

Book Index

Workflow Scripts

The workflow scripts can be entered:

Book Contents

Book Index

Workflow step approval from email

Function allows approval of workflow work steps which don't require user access. User can approve or reject steps directly from email or open them as html link.

pic_3778

Picture: Email with workflow step

Description of Fields:

Approve

User approves step directly from email

Reject

User rejects step directly from email

Open

User opens workflow step in default web browser for given system. If step parameters are defined as editable then here we can change their values or their comments.

pic_3779

Picture: Workflow step in web browser

Settings procedure:

1. AS configured also for task planning, must be installed i.e. parameter in ini file AS SCHEDULESERVICE=1 and functioning API (web service server).

2. Launch WkfEmailConfiguration.pas script in IS K2 and set up its values.

pic_3776

Picture Step configuration via email

Description of Fields:

URL address of web services server

Server where API is installed,

Type of electronic address for e-mail.

Type of electronic address which should be used from Contact Persons for sending email to workflow user.

3. User through which AS and IS K2 communicate together, should have mail account correctly set and configured in IS K2 Mail module.

4. IS K2 users should be correctly paired with Contact person.

5. Every contact person, connected to user, must have login details for API shown on page E. Number of record value in "Web” field must be set in AS INI file as "AS3IO" parameter.

pic_3777

Picture: Login details of contact person for API

6. Script WKFSheduleEmailTask.pas (described together with its parameters in script catalogue) must be included in Workflow procedure book of IS K2 at specific procedure step which doesn’t require user login and can be approved via email. Procedure variables, which are at this step, are generated in the same order they were entered in step and with properties defined for them.

7. Option Selstep has been added to step approval via email. User can now choose another user in email to which he/she will send the next step. Users’ selection at steps is defined with procedure.

Book Contents

Book Index

Workflow Parameters

Workflow parameters are entered in the Versioned Procedures book on page 2 in the Events tab. They are always added to the event for which the user wishes to evaluate/enter the parameter.

The parameter is evaluated when the user executes the specified event in the process step (or the process).

Book Contents

Book Index

Arrow evaluation

Parameter is set for arrow, i.e. after arrow is highlighted and it's used to decide if process run should continue via this arrow.

E.g. Process can go through different steps when invoice value is higher, when invoice cost centres are set differently, ...

For evaluation we can use:

pic_3120

Picture: Arrow parameters entry when variable value "Check" = "No”

pic_2045

Picture: Procedure "Task", arrow parameters entry when variable value "Check" = "Yes”

Example: There is procedure “Task”, see picture below, which contains variable "Check”. Variable values can be either “Yes” or “No”. It depends on the variable value which step will be created after “Task Solving”:

Set up of parameter and variable in procedure:

For the process to work this way there must be set up done after arrow is highlighted in Action tab to define conditions to “move through” the arrow:

pic_1066

Picture: Expression Entry form after parameter ArrowIf selection

Description of form fields:

nt

Logical expression “not“ (to negate expression shown in brackets).

ad

Logical expression “and“ (logical multiplication).

or

Logical expression “or“ (logical sum).

IF

Logical expression “if“ (it’s used to select value based on certain conditions).

"V

It's used to choose variable from Book of procedure variables. When pressing this button Definition of Variables book displays.

"P

It’s used to fill in field from assigned K2 product (from invoice, order...). Value of this field will be evaluated during process run. Aggregation function ("first”, "last”...), through which we determine way of variable evaluation if process contains more products of same type (e.g. more received invoices), is entered here:

Example: Process has assigned 3 received invoices. First invoice has nett value: 300 CZK, second 200 CZK and third 10 CZK.

  • "First” - field value from first appearance of the product is evaluated (from first entered invoice) - nett value 300 CZK is selected for evaluation.
  • "Last” - it’s evaluated from the last invoice - value 10 CZK is chosen for evaluation.
  • "Max” - maximum value from all is selected - value 300 CZK is chosen for evaluation.
  • "Min” - minimum value from all is selected - value 10 CZK is chosen for evaluation.
  • "Count” - number of all values is counted - number 3 is chosen for evaluation.
  • "Sum” - summary of all values - value 510 CZK is entered for evaluation.
  • "Avg” - average of all values - value 170 CZK is entered for evaluation.

Book Contents

Book Index

Process status

“ProcStatus“ parameter - Process Status:

Example: In the first step of the process during the Approval, the status of the process is set to "Entered" when  you agree to the step, in the fourth step, the status of the process changes to "Approved" at the Approval event.

Change set up of process status in procedure:

pic_1068

Picture: Value - book form after selecting "ProcStatus” parameter

Book Contents

Book Index

Document type

Parameter “DocType“ - Document Type allows user to insert document from his/her computer to process. This can be done with Insert Document button in step detail of Steps book (or possibly in For Processing book). This button becomes active by correct entry of parameter in procedure:

pic_1177

Picture: Form Types after selecting parameter “DocType“

Press button Insert Document in book For Processing / Steps.

pic_2877

Picture: Button Insert Document, list of document types available for inserting is displayed

Book Contents

Book Index

Insert product

“InsProd“ parameter - Insert Product allows step assignee to attach K2 system Products (invoice, bank statement, delivery note, ...) to process. This is done using the Insert product button in the step detail in the  Steps book  (or in the To -do book). This button becomes active by correct entry of parameter in procedure: Process:

pic_2878

Picture: Form Product - products inserting via “InsProd“ parameter

Press button Insert Product in book For Processing / Steps.

pic_1178

Picture: Work Step form after pressing Insert Product button

Book Contents

Book Index

Owner according to another step

“UserStep“ parameter - Owner according to Another Step is used at Entry event and according to owner of another step it chooses for which contact person step will be created.

Example: List of “Travel Order“ procedure steps is in Procedure Steps book. Person classified in role “CP_VYUCT“ received and processed step “Fill in of Authorization“, step "Business Travel Claim” should also be created for person with "CP_VYUCT” role. Therefore we should add parameter “UserStep“ in Entry Event of the step and in Value field we choose step “Fill in of Authorization“.

pic_1179

Picture: Procedure Steps- book form after selecting "UserStep” parameter

Book Contents

Book Index

Same owner

Parameter “SameUser“ - Same Owner is used at Entry event.Step owner which has already processed step earlier (rejected or approved) is chosen from contact persons listed in step Role.

Example: Five coordinators in company send contracts for signature to director. When signature is rejected by director, approval process will return back to the coordinator, which sent the contract to director.

Book Contents

Book Index

Selection of next steps

With parameter “SelStep“ - Selection of Next Steps we allow user at Exit Event (Step Approval or Rejection) to select from next process steps the step, which should be created. User can select also more of these steps.

Book Contents

Book Index

Calculation of variable value

By using “CalcVar“ parameter - Calculation of Variable Value, given value is at certain event entered to process variable.

Note: Meaning of buttons nt, ad, or, IF, "V, "P, see Fields Description in Editor, parameter „ArrowIf“.

Example 1: In picture below, value “6“ is set in process variable DNU, at event Approval of the step.

pic_1180

Picture: Expression Compilation form after “CalcVar“ parameter selection to enter its Value.

Example 2: {CALCVAR}[DATE_FROM]:=[DATE_FROM_PL] - selected event of the step or the process assigns actual variable value DATE_FROM_PL to variable DATE_FROM.

Example 3: {CALCVAR}[DATE_FROM]:=0 - zero date is assigned to variable DATE_FROM.

Example 4: {CALCVAR}[DATE_FROM]:=%12.12.2012 - date 12.12.2012 is assigned to variable DATE_FROM. (% sign should be added before date value).

Example 5: {CALCVAR}[STATUS]:='Default’ - text 'Defaults’ is assigned to variable STATUS. (text variable value must be entered with apostrophes).

Book Contents

Book Index

Variable set up

“SetVar“ parameter - Variable Set up allows step user to enter/change value of selected variable (e.g. invoice value, cost centre number, text entry...) during process run. According to this variable process can be further evaluated and managed. (e.g. according to cost centre entry we can define to what other people will process further lead to).

Book Contents

Book Index

Creating a Process

“CreateProc“ parameter - by Process Creation entered at certain step Event we ensure that new process will be created at this event. Header of procedure, according to which process will be created, is selected at this parameter entry. Process will then run according to currently valid version of selected procedure header.

Book Contents

Book Index

Check of Variables

By parameter “Validation“ - Check of Variables we ensure check of variable value entered in process.

pic_1228

Picture: Expression Entry form after selection of “Validation“ parameter to enter its Value.

Example: In picture is with button "V set, that in process:

If we want to check date value in variable, we enter date in format: [DATE]>%12.12.2012. i.e. we enter % sign before date. With following entry we can ensure that there’ll be no zero value, i.e. 0.0.0000, in date variable: [DATUM]<=0.

Book Contents

Book Index

User for Work Step

Parameter "UserVar" - User for the work step allows us to create in process  step to the contact person according to the value of the Variable. Variable of parameter can be entered via Expression Entry form, which appears after “UserVar“ parameter is selected. Variable should be entered to Expression field via "V button and by choosing offered variable, possibly it can also be entered in hand by writing Identifier of variable in square brackets.

pic_1943

Picture: Expression Entry form after selection of “UserVar“ parameter to enter its Variables.

Variable should meet following conditions to ensure correct working of parameter:

Example: In picture above is via "V button set that step in process will be created for person, which is currently set in process in "USRGRP” variable value.

Book Contents

Book Index

Action at Product

Parameter "ProdAct" - Action on the product allows when perform the specified action with the product that will be assigned to the process.

For example: Received invoice is confirmed when step is approved, received invoice is cancelled when step is rejected.

pic_1963

Picture: Form Action Entry at Product after selecting “ProdAct“ parameter

Product

Product header is chosen here. Specific product, which will then be assigned to process, will at given event either be confirmed or cancelled.

Actions

Here we enter action type which should be performed at entered event together with product. We can do following actions with specific product assigned to specific process:

If product, which doesn’t meet conditions to take the action, will be assigned to process, K2 system doesn’t allow us to perform operation responsible for the action.

If product, at which given action has already been performed, is assigned to process, K2 system allows to perform the operation.

Book Contents

Book Index

Check of closure of all steps

Arrow parameter "AllStepsClosed” - Check of Closure of All Process Steps is responsible for steps convergence to one step “Unification” - which is generated when all process steps are finished. Steps “For Attention” are not taken into account.