Skip to main content

We have a Business Rule that sends a command to the monitor to generate a PROJECT_EVENT at a specified time.  If, the specified time is later changed however, we want the orignal request to be updated with the new time, or cancelled and the new request and time sent to the monitor.  Instead what we are seeing is an EVENT created at the original time, and another EVENT created at the NEW time. How can we achieve this?

 

BR XML:

<perform_send_to_monitor>
  <parameters>
    <action_time_value>@user_def_dttm2</action_time_value>
    <monitor_action>
      <update_project_event>
        <project_event>
          <project_id>@project_id</project_id>
          <event_type>EXPIRED</event_type>
          <insert />
        </project_event>
      </update_project_event>
    </monitor_action>
  </parameters>
</perform_send_to_monitor>

If it is related to updating the existing event, I believe, In your xml message, it has been defined as an insert tag where it needs to be changed to an update tag. Also since you need to update the existing event record, you might need the primary keys (both event_sequence and project_id) passed as well. You might need a proper validation for that (may be a tabular /hierarchy select result in the xml message to find out the correct event via xpath or a condition in the BR inputs)  

<perform_send_to_monitor>
  <parameters>
    <action_time_value>@user_def_dttm2</action_time_value>
    <monitor_action>
      <update_project_event>
        <project_event>
          <project_id>@project_id</project_id>

           <event_sequence>qmatching event sequence needs to be passed]</event_sequence>
          <event_type>EXPIRED</event_type>
          <update />
        </project_event>
      </update_project_event>
    </monitor_action>
  </parameters>
</perform_send_to_monitor>


Reply