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
  • 1.  Scheduling a task

    Posted Fri October 31, 2014 11:57 AM

    I am new to Software AG webMethods, and am evaluating it for a series of integration scenarios. I installed webMethods (The latest evaluation version) on an Oracle Virtual Box VM with Windows Server 2012 R2.

    I want to schedule a task that logs “test 123” to the Server Log on a 10 second interval. I created new Flow Service in Software AG designer 9.6, after creating a new Package. I placed a pub.flow:debugLog sub-task/command in the Tree View of the Flow Service. I created a text input and ran it from the right-click menu after setting my message under → Run As → Configuration.

    At this point it logs to the Server Log. The problem I now have is to schedule it. I went to the admin console on localhost:5555, selected Scheduler and clicked on Create Scheduled Task.

    I filled in the form with my service details. I then clicked on “Save Tasks”, and it showed me a blank error message.

    It logs this in the server error logs:

    java.lang.NullPointerException: null
    at com.wm.app.b2b.server.scheduler.ScheduleDB.getConnection(ScheduleDB.java:1259)
    at com.wm.app.b2b.server.scheduler.ScheduleDB.stickTheTaskInTheDB(ScheduleDB.java:2197)
    at com.wm.app.b2b.server.scheduler.ScheduleManager.addRepeatingTask(ScheduleManager.java:335)
    at com.wm.app.b2b.server.scheduler.ScheduleManager.addRepeatingTask(ScheduleManager.java:316)
    at wm.server.schedule.genericUpdateTask(schedule.java:1645)
    at wm.server.schedule.addUserTask(schedule.java:1264)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.wm.app.b2b.server.JavaService.baseInvoke(JavaService.java:453)
    at com.wm.app.b2b.server.invoke.InvokeManager.process(InvokeManager.java:640)
    at com.wm.app.b2b.server.util.tspace.ReservationProcessor.process(ReservationProcessor.java:39)
    at com.wm.app.b2b.server.invoke.StatisticsProcessor.process(StatisticsProcessor.java:49)
    at com.wm.app.b2b.server.invoke.ServiceCompletionImpl.process(ServiceCompletionImpl.java:243)
    at com.wm.app.b2b.server.invoke.ValidateProcessor.process(ValidateProcessor.java:49)
    at com.wm.app.b2b.server.invoke.PipelineProcessor.process(PipelineProcessor.java:171)
    at com.wm.app.b2b.server.ACLManager.process(ACLManager.java:289)
    at com.wm.app.b2b.server.invoke.DispatchProcessor.process(DispatchProcessor.java:34)
    at com.wm.app.b2b.server.AuditLogManager.process(AuditLogManager.java:368)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:544)
    at com.wm.app.b2b.server.invoke.InvokeManager.invoke(InvokeManager.java:383)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:244)
    at com.wm.app.b2b.server.ServiceManager.invoke(ServiceManager.java:108)
    at com.wm.app.b2b.server.ServiceManager.invoke…

    Could anyone please give me some pointers?


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Scheduling a task

    Posted Fri October 31, 2014 01:19 PM

    Under Settings → JDBC-Pools, check for the function “IS Internal”, if this is working.

    The scheduled tasks are stored in the database table IS_USER_TASKS.

    I am not quite sure how the trial version is configured at that point.

    Regards,
    Holger


    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 3.  RE: Scheduling a task

    Posted Mon February 04, 2019 10:22 AM

    [size=9][Holger von Thomsen]Under Settings → JDBC-Pools, check for the function “IS Internal”, if this is working.

    The scheduled tasks are stored in the database table IS_USER_TASKS.

    I am not quite sure how the trial version is configured at that point.[/size]
    [/quote]

    IS there a way to check last modified date of a “Scheduler Task”

    Thanks,
    Madhu.


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General


  • 4.  RE: Scheduling a task

    Posted Mon February 04, 2019 11:10 AM

    Hi Madhu,

    you will have to introspect the table IS_USERS_TASKS in the useer/schema which contains ISInternal schema component.
    Look for a column named INSERTTIMESTAMP or similar.

    Regards,
    Holger


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 5.  RE: Scheduling a task

    Posted Mon February 04, 2019 06:16 PM

    IS there a way to check last modified date of a “Scheduler Task”

    Thanks,
    Madhu.
    [/quote]

    I doubt if you could capture this info OOTB as IS_USER_TASKS table does not have Audit-Date-Time-Stamp, even security logs does not show anything if you update the scheduler settings.

    I think you have to build some custom logic around IS_USER_TASKS but this is not recommended approach and might be risky.

    Provide more details on your requirement, why you need to check the last modified date?


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB


  • 6.  RE: Scheduling a task

    Posted Tue March 19, 2019 04:16 AM

    // pipeline
    IDataCursor pipelineCursor = pipeline.getCursor();
    String startDateTime = IDataUtil.getString( pipelineCursor, “startDateTime” );
    String endDateTime = IDataUtil.getString( pipelineCursor, “endDateTime” );
    String startDateFormat = IDataUtil.getString( pipelineCursor, “startDateFormat” );
    String endDateFormat = IDataUtil.getString( pipelineCursor, “endDateFormat” );
    pipelineCursor.destroy();
    Boolean includeEndDateFlag = (Boolean) IDataUtil.get( pipelineCursor, “includeEndDateFlag” );
    try {
    SimpleDateFormat sdf = new SimpleDateFormat(startDateFormat);
    Date sdt = sdf.parse(startDateTime);
    SimpleDateFormat edf = new SimpleDateFormat(endDateFormat);
    Date edt = edf.parse(endDateTime);;
    long timediff=0;
    if(includeEndDateFlag){
    SimpleDateFormat newendsdf = new SimpleDateFormat(endDateFormat);
    Calendar c = Calendar.getInstance();
    c.setTime(sdf.parse(endDateTime));
    c.add(Calendar.DATE, 1); // number of days to add
    endDateTime = newendsdf.format(c.getTime());
    edt = edf.parse(endDateTime);
    timediff = edt.getTime() - sdt.getTime();
    }
    else{
    timediff = edt.getTime() - sdt.getTime();
    }
    String displayTimeSec = Long.toString(timediff / 1000);
    String displayTimeMin = Long.toString(timediff / 60000);
    String displayTimeHr = Long.toString(timediff / 3600000);
    String displayTimeDay = Long.toString(timediff / 86400000);
    pipelineCursor.last();
    pipelineCursor.insertAfter(“dateDifferenceSec”, displayTimeSec);
    pipelineCursor.insertAfter(“dateDifferenceMin”, displayTimeMin);
    pipelineCursor.insertAfter(“dateDifferenceHr”, displayTimeHr);
    pipelineCursor.insertAfter(“dateDifferenceDay”, displayTimeDay);
    pipelineCursor.destroy();
    } catch (ParseException e) {
    IDataUtil.put(pipelineCursor, “errorMessage”, e.toString());
    }
    pipelineCursor.destroy();


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General