Tell a Story using a Computer Language

"For the first time you can tell a story using a programming language!"


Well maybe the story telling has nothing to do with computer technology, but this a very first sight opinion. We speak to computers (write programs) because we want something to say to computers about things that have to be done (because computers are our subordinates). In case the computer knew a human language, we had to speak to it using our language, and all would be perfect. Unfortunately computers are not like that. So we must learn a computer language in order to say anything we want to computers. Right?




The computer (programming) languages can not used to tell anything to computers. You can say to a computer "I want from you to calculate this and that and after that get this value. By using this values calculate the maximum of those numbers and then display the value to your boss (the user)". The computer can understand perfectly what you said to it. There is no problem at all.


Now lets try to say the following to your computer:


"I want from you to run a car service facility. So the job that has to be done is the following: Everyone of our employees can take calls from customers in order to arrange a service appointment. The customer gives a name and the car number and model. A date and time are provided from our employee. The customer arrives at the facility's gate at the specified date and time. The gate personnel gives him the permission to enter. The customer goes to Chief Mechanic. Here the Chief Mechanic defines who is going to disassemble the car's engine, what are the required parts and  who is the Reassembling Mechanic. After that the Disassembling Mechanic work's on the car while at the same time the personnel on the warehouse collect's the required parts. After both of the tasks are finished the Reassembling Mechanic starts to put the parts and reassemble. While the technical personnel takes care of the customer's car he can have a coffee at the facility's cafeteria.  After the customer finishes his/her coffee and also the car is serviced the customer goes to office in order to pay and have a goodbye. That's all."


Well now our computer will be confused a little, don't you think? It can understand perfectly everything about its "world" (computational procedures) but it can not understand a word from the above command (human activity procedures). That's our world!


Folks don't be disappointed from that. Now there is a solution to it. But first let me rephrase the title of this article, a little:


"For the first time you can write a process using a programming language!"


The following context expresses the above bosses story using phrases that a computer can understand.




  {(1)....any user can put a new service request}


   callwait bpm_assign_job ( "new service request" , __activation_user , "" , 0)


  {(2) date (app_date) the GATE SECURITY waits the customer to come for the appoinment}


   callwait bpm_assign_job ( "service appointment" , "" , "GATE SECURITY" , app_date_num , serv_id )


  {(3)....the CHIEF MECHANIC makes the first estimation of labor and materials, assigns a mechanic}


   callwait bpm_assign_job ( "service estimation" , "" , "CHIEF MECHANIC" , 0 , serv_id )


  {split the same time, the warehouse prepares the materials,}

   {       the mechanic starts working, the cafeteria hosts the cutomer}


   split_in_branch                                 {parallel split....the technical department does the job while in...}


      split_in_branch         {parallel split...(4) the warehouse prepares the required parts while ...}


          callwait bpm_assign_job ( "collect parts" , "" , "WAREHOUSE" , 0 , serv_id )


      and_branch               {(5).... the assigned mechanic disassebles the engine}


          callwait bpm_assign_job ( "disassemble" , disas_mechanic , "" , 0 , serv_id )




    {(6).... the assigned mechanic puts the parts and reassebles the engine}


      callwait bpm_assign_job ( "reassemble" , reass_mechanic , "" , 0 , serv_id )


   and_branch                                     {(7).... the cafeteria the customer takes a cofee}


      callwait bpm_assign_job ( "host customer" , "" , "HOSTESS" , 0 , serv_id )


   join_branches               {...the customer finished his/her coffee and the job has been done}


   {(8)....the customer goes to the office in order to pay}


   callwait bpm_assign_job ( "payment and goodbye" , "" , "OFFICE" , 0 , serv_id )




Those code lines above are the commands that were given to the "SERVICE_MANAGER". The coordinator agent for the above "car service facility". This is AutoScript. The kosmos/BOS suite's scripting language. Well the script is not just like that (I cheated a little in order to easy the reader's understanding). In reality the code is a mixture of human process and computational procedure. This is an even better mixture of capabilities for the programmer. 


...and after that the applications:





Rafael J. Pavlides