Topic
  • 4 replies
  • Latest Post - ‏2012-04-18T07:19:51Z by Secloud
Secloud
Secloud
5 Posts

Pinned topic How to trigger a control flow/schedule from another application

‏2012-04-16T11:31:30Z |
Hi folks,

I'm wondering if it's possible to trigger a schedule/control flow that I see in the Infosphere Warehouse Administration Console from another application's call (like a completely independent Java application)? What I'd like to do are automatic tests for my data warehousing flows, but I can't seem to find any other option to start the schedules than scheduling them at a specified time or let them run periodically through time.

Thanks.

Yaro
Updated on 2012-04-18T07:19:51Z at 2012-04-18T07:19:51Z by Secloud
  • SystemAdmin
    SystemAdmin
    203 Posts

    Re: How to trigger a control flow/schedule from another application

    ‏2012-04-17T01:48:32Z  
    Hi,
    You can use Admin Console command line interface to launch the flow by command. Refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.dwe.admcmdline.doc/c-commandlineoverview.html?resultof=%22%63%6f%6d%6d%61%6e%64%22%20%22%6c%69%6e%65%22%20 for details.
  • Secloud
    Secloud
    5 Posts

    Re: How to trigger a control flow/schedule from another application

    ‏2012-04-17T09:19:10Z  
    Hi,
    You can use Admin Console command line interface to launch the flow by command. Refer to http://publib.boulder.ibm.com/infocenter/db2luw/v9r7/topic/com.ibm.dwe.admcmdline.doc/c-commandlineoverview.html?resultof=%22%63%6f%6d%6d%61%6e%64%22%20%22%6c%69%6e%65%22%20 for details.
    Thanks zhanggi,

    That section helped me a bit. If I wanted a completely different application to start any of the control flows from a Windows machine, I'd create a *.bat file that sends commands for execution to the console. For example, here's the contents of the *.bat file to execute a simple connect and disconnect by using a configFile named aa. Do you think this is a good way of sending commands through or does there exist any 'standard' way of executing multiple commands through this given command line interface?

    call C:\PROGRA~1\ibm\ISWarehouse\whcommand\bin\wh.bat connect -configFile aa
    call C:\PROGRA~1\ibm\ISWarehouse\whcommand\bin\wh.bat disconnect

    Thanks again.

    Yaro
  • zxning
    zxning
    20 Posts

    Re: How to trigger a control flow/schedule from another application

    ‏2012-04-18T03:06:34Z  
    Hi Secloud:

    You can write all the commands in a single bat file, instead of using multiple files for different commands. Pls see the following example contents I copied
    out from a bat file.

    === example.bat ===
    @call wh connect -hostname 9.181.135.60 -portnumber 9082 -user db2admin -password dwe08busy

    @call wh listApplication

    @call wh executeProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh getProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh listProcessInstance -app myapp

    @call wh startProcessInstance -app appvar -process cf-var -instance cf-myprof1 -profile prof1

    @call wh getProcessInstanceStatus -app appvar -process cf-var -instance cf-myprof1

    @call wh deleteProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh deleteProcessInstance -app appvar -process cf-var -instance cf-myprof1

    @call wh disconnect
  • Secloud
    Secloud
    5 Posts

    Re: How to trigger a control flow/schedule from another application

    ‏2012-04-18T07:19:51Z  
    • zxning
    • ‏2012-04-18T03:06:34Z
    Hi Secloud:

    You can write all the commands in a single bat file, instead of using multiple files for different commands. Pls see the following example contents I copied
    out from a bat file.

    === example.bat ===
    @call wh connect -hostname 9.181.135.60 -portnumber 9082 -user db2admin -password dwe08busy

    @call wh listApplication

    @call wh executeProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh getProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh listProcessInstance -app myapp

    @call wh startProcessInstance -app appvar -process cf-var -instance cf-myprof1 -profile prof1

    @call wh getProcessInstanceStatus -app appvar -process cf-var -instance cf-myprof1

    @call wh deleteProcessInstance -app myapp -process cf1 -instance cf1-mytest1

    @call wh deleteProcessInstance -app appvar -process cf-var -instance cf-myprof1

    @call wh disconnect
    Hi zxning,

    Thank you, yeah, the commands I pasted come from a single bat file as well. Your notation seems much more handy and shorter. Well, I guess now I finally know how to start ISW instances from different applications.

    Regards,

    Yaro