how to decode the trigger name from the table : WM_IDR_MSG_HST in IS Internal Schema. ?
I have a requirement to find the message UUID’s belonging to a particular trigger name,but the above product table form IS internal schema is storing the trigger name encoded.
Its has the colums: TRIGGERNAME ,UUID , P_STATE ,EXP_TIME.
I think this is not possible as it uses MD5 hash algorithm and if you find a way let me know. Here is the code used to create the above encrypted string.
import com.wm.data.*;
import com.wm.util.Values;
import com.wm.app.b2b.server.Service;
import com.wm.app.b2b.server.ServiceException;
import com.wm.util.Base64;
import com.wm.security.Util;
public final class getTriggerName_SVC
{
/**
* The primary method for the Java service
*
* @param pipeline
* The IData pipeline
* @throws ServiceException
*/
public static final void getTriggerName(IData pipeline) throws ServiceException {
// pipeline
IDataCursor pipelineCursor = pipeline.getCursor();
String triggerName = IDataUtil.getString( pipelineCursor, "triggerName" );
String myString= null;
byte[] encodedHash;
try {
encodedHash = Base64.encode(Util.getDigest(triggerName.getBytes()));
myString= new String(encodedHash);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
IDataUtil.put( pipelineCursor, "outString", myString);
pipelineCursor.destroy();
}
In addition to the above code, reading from node.ndf file solution looks nice as you can leverage the below services directly and build a custom flow logic.
wm.server.triggers:getTriggerReport (get all native triggers)
wm.server.ns:getNode (get node/trigger/uniqueId)
Let us know which path you take or if you have any other options on hand.