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 customer orders can be automated



Product Orders Process Automation

This application is about a “tailor-made goods company.“ The application requires automating the “procedure“ of “customer‘s order.“ That means the successive “steps“ of the procedure are automatically forwarded from one employee to another without any “manager“ intervention. The manager can see what tasks (steps) the employees are assigned by the system at any time. After a certain period, the manager has a complete report on what tasks each employee has assigned, when they have started, and when they have finished the tasks.

The requirements, put on the application from the supposed “tailor-made goods company“ owner, are the following:

“Every employee can put “orders“ from customers. The “order“ contains the customer‘s name and some products, that are only tailor-made and not ready on the selves. The manufacture of goods starts (all simultaneously), but it‘s obvious that they complete at different times. As soon as we manufacture the last good, the “order“ is packaged and shipped. That‘s all.“

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

start_action

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

   {(1) any user can put a new customer order}

   callwait bpm_assign_job ( “new order“ , __activation_user , ““ , 0)

   ord_id = bpm_getrecid(1,__au_step)                           {......get the record id of the service request}

   customer = LookUp(“ORDER“,“ORDER“,ord_id,“CUSTOMER“,““)

   call bpm_setprocedurecomment(customer)                           {.....set the procedures comment}

   {...................................put all product in array variables}

   start_sql “_DAT“ “KOSMOS“
        SELECT PRODUCT.*
        FROM PRODUCT
        WHERE (PRODUCT.ORDER = :P)
   end_sql
   call RunEmbSQL(“_DAT“,ord_id)

   q = QueryByName(“_DAT“)
   count = TRecordCount(q) ,

   call TFirst(q)
   for i = 1 to count

       prod_id[i] = TGetFld(q,“PRODUCT“)
       prod = TGetFld(q,“PRODUCT_NAME“)
       quant = TGetFld(q,“QUANTITY“)

       comm[i] = strcat(“PROD=“, prod, “ Q=“, quant )

       call TNext(q)
   next
   call FreeEmbSQL(“_DAT“)

   {..................................start the production of products (all start at the same time}

   split_for i = 1 to count

       {(2)....construct every product requested ...parallel split}

       call bpm_setstepcomment(comm[i])

       callwait bpm_assign_job ( “construct product“ , ““ , “PRODUCTION“ , 0 , prod_id[i] )

   next_branch

   {(3) when all products have been constructed then ship the order}

   callwait bpm_assign_job ( “ship order“ , ““ , “TRANSPORTATION“ , 0 , ord_id )

end_action

We can see the callwait (or split_in_branch) keywords. Those keywords allow the agent to wait (until the user has finished a job) or parallel code execution. Those are capabilities that are not presented every day in a programming language (ok, script!). Notice that the callwait “calls“ the user‘s activity as it would be a “program‘‘s subroutine.“ Notice also that we have a flow of procedures that is the program‘s conditions into 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 (agent prototype precisely) 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 the jobs are assigned to users (employees) by name. But mainly by their roles in the company. We have defined the users and roles in the application can be found at Menu->System->Users/Positions.

How do we activate the agent?

A “new customer order“ can be activated from the “New Action“ button on the left of the application window. Then, the users 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, they “forward“ the completed activity to the next step. Then the activity disappears from the window.

To see activities assigned to them for today or are uncompleted from yesterday, they have to 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).