title: Firing Maximo workflow event from code
body: <p>In our Maximo workflow we have a few schemas in which work order reaches a Condition node with a check on a startdate. If current date is less than it's startdate then work order goes to a Wait node with "maximo.workorder.update" condition. So when the scheduled date for WO comes people need to go to WO tracking and save this WO manually. Only then it continues it's way through the workflow. Otherwise WO will sit on that Wait node till the end of time.</p>
  
  <p>What I want to do is to trigger this update event by crontask everyday so when the right date comes WO will wake up by itself.</p>
  
  <p>I inspected source code for a Save button in WO tracking application and found that no matter what there's MboRemoteSet.save() method call. I assumed that you need to get some changes done and then call save() on the right MboSet. Also I know that in DB there's table called EVENTRESPONSE that keeps track of WOs sitting on the Wait nodes in workflow.
  My crontask class contains this code:</p>
  
  <pre><code>MXServer mxServer = MXServer.getMXServer();
  UserInfo userInfo = mxServer.getUserInfo("maxadmin");
  woSet = mxServer.getMboSet("WORKORDER", userInfo);
  ...
  String query = "select sourceid as WORKORDERID from EVENTRESPONSE"
                  + " where eventname = 'maximo.workorder.update'"
                  + " and sourcetable = 'WORKORDER'";
  SqlFormat sqf = new SqlFormat("workorderid IN (" + query + ")");
  woSet.setWhere(sqf.format());
  MboRemote wo;
  Date currentDate = new Date();
  for (int i = 0; (wo = woSet.getMbo(i)) != null; i++) {
      System.err.println(wo.getString("description"));
      wo.setValue("CHANGEDATE", currentDate);
  }
  woSet.save();
  </code></pre>
  
  <p>workorder.changedate successfully refreshes but "maximo.workorder.update" event doesn't proc and WO stays on the Wait node.</p>
  
  <p><strong>So, how should I fire maximo.workorder.update?</strong></p>