Skip to main content
1-Visitor
June 16, 2015
Question

How to get "Synchronize" component in the workflow in the javacode

  • June 16, 2015
  • 1 reply
  • 2717 views

Hi,

Can any one help me in getting "Synchronize" component in javacode.

sync.png

Thanks in advance

Regards,

Archana

1 reply

1-Visitor
June 16, 2015

Archana,

Your question does not provide enough information about what you are trying to do.  I will say that the Help Centre covers information on using Synchronization Robots.  There are different "type" settings for these Robots that determine how the code is run.  An expression type with run the code periodically (Documentation states every couple of seconds) to evaluate if a condition has been met and proceed if true.  An Object type will "listen" to events on the Object supplied by a variable and you can choose which type of event your Robot is listening for and evaluate accordingly.  One example is listening for a State change and processing if "State A" then do this otherwise do that (result = this, result = that).  The last is Class type where the Robot listens for events emitted by all objects of a given class.

I will qualify the above with this being my understanding.  Experts - if I have misinformed please correct.

1-Visitor
June 17, 2015

Hi Keir,

Thanks for ur information.

Let me explain u what is my requirement.

I have a requirement, where my custom java code takes an input of ChaneNotice number, and returns where it is stuck in its associated workflows.

I am able to capture in the code if it is stuck in any of the tasks ex:"Complete change Notice" or "Review ICN" and etc. But due to some issues, my CN got stuck in ESI workflow in "Post_release" Sync Robo. So i need to capture this in my java code and return to UI.

Using "WorkItem" API i am able to capture tasks of CN. In the same way I need an API which will represent this "Sync Robo" components of workflow.

Thanks in advance.

Regards

Archana

1-Visitor
June 17, 2015

You can query sync robots in wfprocess using below API's

      

       WfProcess process=null;

      

       QuerySpec qs1 = new QuerySpec(WfSynchRobot.class);

        qs1.setAdvancedQueryEnabled(true);

        qs1.appendWhere(new SearchCondition(WfSynchRobot.class,

                WfActivity.PARENT_PROCESS_REF + "." + ObjectReference.KEY,

                SearchCondition.EQUAL, PersistenceHelper.getObjectIdentifier((Persistable)  process).getId()));

        QueryResult syncRobots = PersistenceServerHelper.manager.query(qs1);

       

  Hope It helps !!!

     

Thanks

Shreyas