Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

How the process of selecting Labels for Packaging is implemented



Product Label Selection Process Automation

This application is about the “Label for Packaging Request Management“ as we would describe it by the “ISO procedure“ of any manufacturing company. The requirement for the application is to automate the “procedure“ of “Label Request.“ That means that the successive “steps“ of the procedure are automatically forwarded from one employee to another without any “manager“ intervention (the “procedure“ is the manager). The manager can see what tasks (steps) the employees are assigned by the system at any time. He can also see what tasks are “scheduled“ for the next few days. After a period, the manager has a complete report on what tasks the system has assigned each employee. And when he has started and finished those tasks.

The requirements put on the application for the “Label Request Procedure“ are the following:

1. The “Product Manager“ usually has permission to start the “New Label for Packaging“ request. The appropriate form appears and the product name, and some description of what is required.

2. After posting the form, the system assigns a task to the “Creative Department“ to do the actual designing work. This work can (and must) be attached to the form.

3. The forwarding of the form from the “Creative Department“ goes to “Product Manager“ again to accept the work‘s quality.

4. If the “Product Manager“ accepts the quality of the “label,“ the procedure sends the form to the “CEO“ and “Legal Service“ to accept or reject the “label“ (the system assigns those tasks in parallel).

5. If the “CEO“ or the “Legal Service“ reject the “label,“ then the form goes again to step (2) to adjust the final “label.“ However, if both the “CEO“ and “Legal Service“ roles accept the “label,“ then...

6. A task is created for the “Procurement Department“ to find a reasonable price and quality for the massive production of the “label.“ Finally, the user writes a price per 1000 labels on the form, and the task is forwarded.

7. At the same time, tasks are assigned to the “CEO“ and “Marketing Department“ to evaluate the final price of the “label.“ If one of them rejects the price, then the procedure goes back to step (6).

8. If both the “CEO“ and the “Marketing Department“ agree on the price, then the procedure creates a task for the “Product Manager“ to file the “label,“ and the procedure ends successfully.


We placed all of the above requirements on a coordinator agent. The action_code of the agent is the following:

start_action

     id = Mykosmos Technology

     call bpm_setprocedureowner(__activation_user) {.....set the procedure owner}

     num = SelectFrom(SELECT MAX(LNUM) FROM P10002_LABEL_PACKAGE“)
     num = num + 1
     call UpdateField(“P10002_LABEL_PACKAGE“,id,“LNUM“,num,“LDATE“,crDate)

     comm = LookUpId(“P10002_LABEL_PACKAGE“,id,“DESCR“)
     call bpm_setprocedurecomment(comm) {.....set the procedures comment}

     for j = 1 to 1000 {_b}
         {...repeat the the following tasks...}
         for i = 1 to 1000 {_b}
         callwait bpm_assign_job ( “Creation of Makette-Photo-Label“ , ““ , “CREATIVE DEPARTMENT“ , 0 , id )
         callwait bpm_assign_job ( “Product Manager Label Check“ , ““ , “PRODUCT MANAGER“ , 0 , id )
         flag = LookUpId(“P10002_LABEL_PACKAGE“,id,“FIRST_CHECK“)

         if (flag = 1) then {...until the product manager agrees with the task outcome!}
                 i = 1000
         endif
         next {_b}

         {....parallel split: at the same time CEO and LEGAL SERVICE check the “label“}
         split_in_branch
         callwait bpm_assign_job ( “Creatives Check From CEO“ , ““ , “CEO“ , 0 , id )
         and_branch
         callwait bpm_assign_job ( “Creatives Check From Legal Service“ , ““ , “LEGAL SERVICE“ , 0 , id )
         join_branches

         check1 = LookUpId(“P10002_LABEL_PACKAGE“,id,“CHECK1“)
         check2 = LookUpId(“P10002_LABEL_PACKAGE“,id,“CHECK2“)

         check = check1 + check2
         if (check = 2) then {_b}
         j = 1000 {....the “label“ is ok continue}
         else
         {......the SEO or LEGAL SERVICE or both disagree...}
         if (flag = 1) then
                 call UpdateField(“P10002_LABEL_PACKAGE“,id,“FIRST_CHECK“,𔄘“)
         endif

         {...back to PRODUCT MANAGER again!}
         callwait bpm_assign_job ( “Product Manager Label Check“ , ““ , “PRODUCT MANAGER“ , 0 , id )
         endif {_b}

     next {_b}

     {.....check the market to find good quality and prices for the production of the “label“}
     for i = 1 to 1000 {_b}
         callwait bpm_assign_job ( “Market Search for Label“ , ““ , “PROCUREMENT DEPARTMENT“ , 0 , id )

         {....parallel execution of tasks again!}
         split_in_branch
         callwait bpm_assign_job ( “Final Label Check from CEO“ , ““ , “CEO“ , 0 , id )
         and_branch
         callwait bpm_assign_job ( “Final Label Check form Marketing“ , ““ , “MARKETING DEPARTMENT“ , 0 , id )
         join_branches

         check1 = LookUpId(“P10002_LABEL_PACKAGE“,id,“CHECK21“)
         check2 = LookUpId(“P10002_LABEL_PACKAGE“,id,“CHECK22“,““)

         check = check1 + check2
         if (check = 2) then {....if both of them agree then finish}
         i = 1000
         endif

     next {_b}

     {.....goto PRODUCT MANAGER to file the “label“}
     callwait bpm_assign_job ( “Label Filing“ , ““ , “PRODUCT MANAGER“ , 0 , id )
end_action

We can see the callwait and split_in_branch keywords. Those keywords allow the agent to wait (until the user has finished a job) or undergo a parallel code execution. Those are capabilities that we are not observing in a script. Notice that the callwait “calls“ the user‘s activity as it would be a “program‘s subroutine.“ Notice that we have a flow of procedures defined by the developer, using conditions in the code. That is a case of ad hoc control flow (not known in advance to the programmer!)

We have to admit that the effect (coordination and historical data collection of the procedure) is far too significant for the lines of code that the application programmer writes. To be precise, the code is a little bigger (the agent contains the code that “describes“ the task (activities) assigned to employees).

We can view the agent prototype from right-mouse Click on Application‘s Background->Developer->Resources->Agent Prototypes. For every “service“ requested, the system creates a new “alive“ agent that starts to execute his action_code.

Where do we define users and roles?

Another issue is that the jobs are assigned to users by name. But mainly by their roles in the company. We have defined the users and roles of the application at Menu-> system ->Users/Positions.

How do we activate the agent?

A “new label for packages requirement“ can be activated from the “New Action“ button in the left of the application window. For the users to see the activities (jobs) assigned to them, exit the demo application, and log in as the user in question.

How can the user see the incoming jobs?

Every user has the incoming activities window defined as “Tasks“ in the menu. Notice that the system sends the same activity to all users who have the same role in the company or organization. When the user “completes“ the activity required data, he “forwards“ the completed activity to the next step. Then the activity disappears from the window.

To see activities assigned to him for today or uncompleted from yesterday, he must activate “Finished Tasks.“

How does the manager can see the current jobs?

By activating Menu->CPO Control Panel->Active Tasks, we see every activity (job) that is assigned at the time and is in the phase of completion, i.e., presented to users “incoming activities.“

How do we can evaluate our employees?

When we activate Menu->System->Associates, we can see a button captioned “Has Done.“ We get all the activities that the user (employee) has finished and by which role by activating it. The time of starting and completing each activity is also available—this way, the actual effort that the user has given to the company can be estimated.

How do we can improve the demo application?

The demo application comes with “Developer“ capabilities. That means we have the opportunity to change the database schema (Right Click->Developer->Resources->Database Manager->Edit Schema). We can also change the forms (Right Click over a form->Designing).