IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Schedulers are getting suspended after deploying services or reloading package

  • 1.  Schedulers are getting suspended after deploying services or reloading package

    Posted Thu June 06, 2019 05:56 AM

    Hi everyone,

    we have an issue with schedulers where they get suspended when package is reloaded or services are migrated with error ‘unresolved dependencies found’ for referenced services.

    Though it works fine in other server this issue is only in one server and we are using 10.1 version.

    Can anyone help me with this issue?

    Thanks,


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Thu June 06, 2019 08:31 AM

    To bypass the error/ scheduler suspend, add the below setting on IS

    watt.server.scheduler.ignoreReferenceValidationErrors=true

    But I recommend you to check the unresoved dependencies and fix them in your deployer build. The error will give you the details about missing artifacts.


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 3.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Thu June 06, 2019 10:13 AM

    Thank you for the solution, Mahesh. It worked.

    Though,
    I do not have any unresolved dependencies in my deployer build, I had them resolved and whenever I reload the package or copy service from another server the schedulers are getting suspended.

    Is there any way I can permanently fix this?

    Thanks,
    Prachi


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 4.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Thu June 06, 2019 02:54 PM

    Maybe there is no direct unsolved dependency in your service, but probably it’s invoking some other services that would has unsolved dependency.
    You could try the service below to find out all unsolved dependencies for any node, not just service.

    
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Stack;
    import com.softwareag.util.IDataMap;
    import com.wm.lang.ns.DependencyManager;
    import com.wm.lang.ns.NSName;
    import com.wm.lang.ns.NSNode;
    import com.wm.app.b2b.server.ns.NSDependencyManager;
    import com.wm.app.b2b.server.ns.Namespace;
    
    public static final void checkInvalidRefs(IData pipeline)
    throws ServiceException {
    IDataMap pipelineMap = new IDataMap(pipeline);
    String nodeName = pipelineMap.getAsString("nodeName");
    
    List<IData> invalidRefs = new ArrayList<IData>();
    
    NSNode nsNode = Namespace.current().getNode(NSName.create(nodeName));
    DependencyManager dm = NSDependencyManager.current();
    if ((dm == null) || (!dm.isEnabled())) {
    throw new ServiceException("Dependency Manager is not enabled");
    }
    
    Stack<IData> referencedStack = new Stack<IData>();
    IData referenced = dm.getReferenced(nsNode, null);
    if (referenced == null){
    return;
    }else{
    referencedStack.push(referenced);
    }
    
    while (!referencedStack.isEmpty()){
    IData referencedData = referencedStack.pop();
    IDataMap referencedDataMap = new IDataMap(referencedData);
    String name = referencedDataMap.getAsString("name");
    String path = referencedDataMap.getAsString("refPath");
    String status = referencedDataMap.getAsString("status");
    if (status.equalsIgnoreCase("reference")){
    IData[] references = referencedDataMap.getAsIDataArray("reference");
    for (int i = 0; i < references.length; i++){
    IData reference = references[i];
    IDataMap referenceMap = new IDataMap(reference);
    String referenceName = referenceMap.getAsString("name");
    String referenceStatus = referenceMap.getAsString("status");
    if (referenceStatus.equalsIgnoreCase("unresolved")){
    IData invalidRef = IDataFactory.create();
    IDataMap invalidRefMap = new IDataMap(invalidRef);
    invalidRefMap.put("nodeName", referenceName);
    invalidRefMap.put("refPath", path == null ? name : path);
    invalidRefs.add(invalidRef);
    }else if (referenceStatus.equalsIgnoreCase("reference")){
    referenceMap.put("refPath", (path == null ? name : path) + "," + referenceName);
    referencedStack.add(reference);
    }
    }
    }
    }
    
    pipelineMap.put("invalidRefs", invalidRefs.toArray(new IData[invalidRefs.size()]));
    }

    Inputs:
    nodeName - String
    Outputs:
    invalidRefs - Document Type List
    nodeName - String
    refPath - String


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services


  • 5.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Thu June 06, 2019 10:59 PM

    Use the code posted by “Xiaowei Wang” or else you can go directly to the scheduler service on the SAG designer, right click on the service and do “Inspect Pipeline References” which gives you the broken references just like the code above.

    Make sure there might be multiple service invocation in the scheduler service and you have to do it on each service invocation if you go by my approach.

    Can you share the screen shot of the scheulder service?


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 6.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Fri June 07, 2019 08:21 AM

    Thank you Mahesh and Xiaowei. Your posts really helped.

    I did infact have bad reference in one of my invoked service. So that issue is solved.

    But, when I reload the package or deploy it to this particular server, I get the error as

    “Unknown Service: Scheduled task will not run.”

    I have attached the screen shots for reference

    Thanks,
    Prachi


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 7.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Fri June 07, 2019 09:58 AM

    I looked at the snapshot, can you verify from the designer if you are able to locate the service that is mentioned in the error on two servers.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 8.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Sun June 09, 2019 07:16 AM

    Yes the service is available onn both the servers.


    #webMethods
    #Integration-Server-and-ESB
    #Flow-and-Java-services


  • 9.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Tue June 11, 2019 12:00 AM

    Could you try run service “wm.server.ns:getNode” and pass your service name as input “name”. Then see what you got in service result.


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 10.  RE: Schedulers are getting suspended after deploying services or reloading package

    Posted Tue June 11, 2019 01:47 AM