Hi,
I've tried to create object notification with java method NotificationHelper.manager.createObjectSubscription for event Revise.
The code below does not work.
Where can I find which is name for Revise event (and also WORKFLOW_STATE_CHANGE)?
eventsMap.put("REVISE", (WTStringMap)null); //--- doesn't work
eventsMap.put("WORKFLOW_STATE_CHANGE", (WTStringMap)null); //--- doesn't work
eventsMap.put("CHECK_OUT_IN", (WTStringMap)null); //---- It works!!
eventsMap.put("DELETE", (WTStringMap)null); //---- It works!!
//get subscriber, currently setting to session user
NotifySubscriptionRecipient subscriber = NotifySubscriptionRecipient.newNotifySubscriptionRecipient(SessionHelper.getPrincipal(), NotifySubscriptionRecipient.TO_ADDRESS);
//create subscription
NotificationHelper.manager.createObjectSubscription(subscriptionAttributes,subscriber, targetObject, eventsMap, true);
Solved! Go to Solution.
Thank you for reply Florent,
Actually subscription event list is:
Revise - event: <NEW_REVISION>;
Publish Unsuccessful - event: <PUBLISH_UNSUCCESSFUL>;
Edit Attributes - event: <EDIT_ATTRIBUTES>;
Workflow State Change - event: <CHANGE_WORKFLOW_STATE>;
Check In from Project - event: <CHECK_IN_FROM_PROJECT>;
Copy - event: <COPY>;
New View Version - event: <NEW_VIEW_VERSION>;
Life Cycle State (Released) - event: <CHANGE_LIFECYCLE_STATE>;... attributeValueMap: <state,RELEASED>;
Share - event: <SHARE>;
Edit Access Control - event: <CHANGE_ACCESS_PERMISSIONS>;
Publish Successful - event: <PUBLISH_SUCCESSFUL>;
Delete - event: <DELETE>;
Save Representation - event: <SAVE_REPRESENTATION>;
Move - event: <MOVE>;
Edit Identity - event: <EDIT_IDENTITY>;
Markup - event: <MARKUP>;
Used By - event: <USED_BY>;
New One-off Version - event: <NEW_ONE_OFF_VERSION>;
Check Out/Check In - event: <CHECK_OUT_IN>;
Event key can be found in <WT_HOME>/src/wt/admin/adminEventResource.java
You may use the "NEW_VERSION" event.
You may rather consider to implement a listener as there is no workflow relative event.
Thank you for reply Florent,
Actually subscription event list is:
Revise - event: <NEW_REVISION>;
Publish Unsuccessful - event: <PUBLISH_UNSUCCESSFUL>;
Edit Attributes - event: <EDIT_ATTRIBUTES>;
Workflow State Change - event: <CHANGE_WORKFLOW_STATE>;
Check In from Project - event: <CHECK_IN_FROM_PROJECT>;
Copy - event: <COPY>;
New View Version - event: <NEW_VIEW_VERSION>;
Life Cycle State (Released) - event: <CHANGE_LIFECYCLE_STATE>;... attributeValueMap: <state,RELEASED>;
Share - event: <SHARE>;
Edit Access Control - event: <CHANGE_ACCESS_PERMISSIONS>;
Publish Successful - event: <PUBLISH_SUCCESSFUL>;
Delete - event: <DELETE>;
Save Representation - event: <SAVE_REPRESENTATION>;
Move - event: <MOVE>;
Edit Identity - event: <EDIT_IDENTITY>;
Markup - event: <MARKUP>;
Used By - event: <USED_BY>;
New One-off Version - event: <NEW_ONE_OFF_VERSION>;
Check Out/Check In - event: <CHECK_OUT_IN>;