Search code examples
documentum

How to pass custom arguments along with standard arguments in a Documentum job method


I configured a job correctly by passing the custom arguments successfully. Now I want to use the custom as well as standard arguments. But the issue is either standard arguments(job id, user name, docbase name and trace level) are getting passed or the custom arguments only. I am unable to get both types of arguments together.

Could anyone suggest any ways to get that done?


Solution

  • I tried to do the same using the custom argument using the Job artifcats and then checking the checkbox "pass standard argument" in DA. But still I was unable to get the custom and standard arguments together.

    For resolving this, I first retrieved the job ID from the standard arguments and then fetched the custom arguments using the following code:

    IDfId idfJobId = new DfId(stringJobId);
    IDfSysObject jobObject = (IDfSysObject) session.getObject(idfJobId);
    CustArgument1 = jobObject.getRepeatingString(ATTR_METHOD_ARGS, 0);
    

    if there are multiple arguments we can get it using a for loop by incrementing index i

    CustArgument1 = jobObject.getRepeatingString(ATTR_METHOD_ARGS, i);