process(
   parameters(
      ontology('job_search'),
      content_language('first_order_logic')
   ),
   %%% Definition of the protocol name %%%
   protocol_name('sd JobSearch'),
   %%% Definition of the agent publisher %%%
   agent_publisher(short_name('jobsManager@address'),long_name('jm/jobsManager:jobsManagerClass')),
   %%% Definition of the agent reader %%%
   agent_reader(short_name('jobSearcher@address'),long_name('js/jobSearcher:jobSearcherClass')),
   %%% Definition of the body contained in the WS_BPEL file %%%
   main_fragment(
      seq([
      send(msg('REQUEST','available_jobs()')),
      receive(msg('INFORM','availablable_job_number(NumbersOfJobs)')),
         while(no_guard,
            seq([
            receive(msg('CFP','propose_job(job(J))')),
               switch([
                  case(no_guard,
                  send(msg('NOT-UNDERSTOOD','not_understood()')),
                  ),
                  case(no_guard,
                  send(msg('ACCEPT-PROPOSAL','accept(job(J))')),
                  ),
                  case(no_guard,
                  send(msg('REJECT-PROPOSAL','reject(job(J))')),
                  ),
                  case(no_guard,
                     seq([
                     send(msg('REQUEST','more_info(job(J))')),
                     receive(msg('INFORM','more_info(info(I))')),
                        switch([
                           case(no_guard,
                           send(msg('ACCEPT-PROPOSAL','accept(job(J))')),
                           ),
                           case(no_guard,
                           send(msg('REJECT-PROPOSAL','reject(job(J))')),
                           ),
                        ]),
                     ]),
                  ),
               ]),
               if_then(no_guard,
               receive(msg('INFORM','job_contact_info(contacts(ListOfContacts))')),
               ),
            ]),
         ),
      ]),
   ))
