You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Mohit Shivhare

Introduction

The SOS website offers the Try Out option form to request an immediate demo for product JS7. When requesting the demo you will receive a welcome e-mail that includes an invitation link and credentials to access the JS7 demo.

After clicking the Try-Out: Login to JS7 link from the welcome e-mail, you will be redirected to the Login window of JOC Cockpit. Use the account and password that you received with the welcome e-mail and log in to the JOC Cockpit window.

After login, you will be presented the initial view, which is referred to as the DASHBOARD, for explanations see Dashboard View. The Dashboard gives a bird's eye view of the JS7 operational status. 

To run Workflow from the JOC Cockpit, you need to switch to the WORKFLOWS view. From the left panel, you can see the folder tree structure expand the folder by clicking the arrow.

After expanding the top folder, all the show sub-folders will display, each folder contains one or more workflow.

All examples in the demo environment follow the same pattern. Each job chain demonstrates a different JS7 feature.

Shell Script Workflow

The example 01_HelloWorld demonstrates the JobScheduler's capability to execute the shell jobs.

  1. To start the HelloWorld example, click on the 01_HelloWorld. From the right panel, you can see the workflow list, e.g. jdHelloWorld
  2. Click on the arrow button to expand the workflow and view the number of jobs available in the workflow.

  3. 01_HelloWorld: the workflow includes a single job with a shell script as executable.    



  4. To execute the workflow 01_HelloWorld click on the action menu of the workflow a drop-down menu will appear. Click on the Add Order button


  5. On clicking the Add Order. A popup window will appear. 
  6. You can add the Order ID or leave the Order Id value blank it will take the default Order Id to process the Order. Click on Submit button. 



  7. To check the status of the Order click on the Workflow name with this new Order history panel will appear. 



  8. From the Order history panel, you can see the Order is successful and finished. Click on the Order ID to open the detail logs of execution.



  9. A log window will open and the order log will be displayed. The order log contains log output from all jobs executed by the order. 
  10. You can download the log file by clicking the Download button from the upper right corner of the log window.

Parallel Execution

The JS7 - Fork / Join Instruction is used to execute the jobs in parallel within a workflow. Fork instruction allows the creation of a parallel number of branches and processes any further instructions and jobs. Branches allow to include any number of instruction and jobs. When an order is executed in a workflow the all the child process first competed in the execution and after the successful execution of the child process, the parent process will complete the task.

In this example, two workflows are available jdFork and jdForkNested. 

jdFork

jdFork contains a simple example of parallel execution with two branches branch1 and branch2. While executing the Order in the workflow and when the order reached the fork statement it execute both the branches and complete the execution after that further job with executing and complete the execution process.

  1. Click on the folder 02_ParallelExecution and expand the jdFork workflow.



  2. To add the order in the workflow. Click on the action menu of the workflow and click on Add order button from the drop-down menu.




  3. On clicking the Add Order. A popup window will appear. 
  4. You can add the Order ID or leave the Order Id value blank it will take the default Order Id to process the Order. Click on Submit button. 

  5. To check the status of the Order click on the Workflow name with this new Order history panel will appear. 



  6. From the Order history panel, you can see the Order is successful and finished. Click on the Order ID to open the detail logs of execution.



  7. A log window will open and the order log will be displayed. The order log contains log output from all jobs executed by the order. 
  8. You can download the log file by clicking the Download button from the upper right corner of the log window. Also, you can expand and collapse the individual job output using the arrow button from the left corner of the log window.

jdForkNested

jdForkNested contains the nested branches in a workflow and with every branch multiples jobs are added to execute the nested workflow. All the parallel branches execute at the same time and complete the execution.

  1. Click on the folder 02_ParallelExecution and expand the jdFork workflow.



  2. To add the order in the workflow. Click on the action menu of the workflow and click on Add order button from the drop-down menu.



  3. On clicking the Add Order. A popup window will appear. 
  4. You can add the Order ID or leave the Order Id value blank it will take the default Order Id to process the Order. Click on Submit button. 



  5. To check the status of the Order click on the Workflow name with this new Order history panel will appear. 



  6. From the Order history panel, you can see the Order is successful and finished. Click on the Order ID to open the detail logs of execution.



  7. A log window will open and the order log will be displayed. The order log contains log output from all jobs executed by the order. 
  8. You can download the log file by clicking the Download button from the upper right corner of the log window. Also, you can expand and collapse the individual job output using the arrow button from the left corner of the log window.

Variable Passing

The JS7 - Variables are used to execute the job using different parameters on the order or on a Workflow. Variables are declared by specifying a name and datatype. We can use variable at different places

  • In the Environment Variable:  The environment variable available for all the Jobs in a workflow.
  • In the Job Resources: You can assign variable in the job resources with this the variable are assigned to the whole workflow or on the jobs.
  • In Order Variable: You can assign values to the workflow while adding an Order. The default and require value is assigned to the order.

The folder 03_VariablePassing contains the workflow based on the variable passing. You can add the order from the action menu of the workflow and from the history you can review the detailed information about the workflow. There are four workflows available with different use cases:

  • jdVariablesAdHoc: The Workflow does not have any Variables declared in the configuration.
  • jdVariablesDeclared: The Workflow has the declared variable with the default values which can be updated while submitting the order using the modify variable from the Add New Order menu.
  • jdVariablesFork: The Variables are declared and have the default value but at the runtime, all the fork jobs use the same value and update according to the job script.
  • jdVariablesNodes: The variable are declared and have the default value but at the runtime, the variables are updated from the job node properties.

To execute all the workflow in the folder 03_VariablePassing please follow the below steps:

  1. Click on the folder 03_VariablePassing from the and expand the jdVariablesFork workflow.

  2. To add the order in the workflow. Click on the action menu of the workflow and click on Add order button from the drop-down menu.




  3. On clicking the Add Order. A popup window will appear. 
  4. You can add the Order ID or leave the Order Id value blank it will take the default Order Id to process the Order.
  5. With the help of Modify Variable button, you can edit the value of the variable assigned to the workflow.

     
  6. Click on the Modify Variable and select the variable name you want to modify from the drop-down menu. e.g; I have selected the variable flight_destination and the default value is India. You can change it according to you and click on Submit button to add the Order in a workflow.



  7. To check the status of the Order click on the Workflow name with this new Order history panel will appear. 



  8. From the Order history panel, you can see the Order is successful and finished. Click on the Order ID to open the detail logs of execution.

  9. A log window will open and the order log will be displayed. The order log contains log output from all jobs executed by the order. 
  10. You can download the log file by clicking the Download button from the upper right corner of the log window. Also, you can expand and collapse the individual job output using the arrow button from the left corner of the log window.


Error Handling

The JS7 - Try / Catch Instruction is used for the error handling in a workflow. If any job runs in the try block and failed due to any reason the catch block will execute otherwise it will skip the catch block. If the catch block will also fail then the order will be considered as failed. The folder 04_ErrorHandling contains the example for the try-catch. The four workflows are available with the different use cases for the try-catch:


  • jdFail: The workflow will execute and fail due to the fail operation is used in the workflow. Even if all the job will execute successfully and the fail object is used at the end of the workflow the order will fail and complete the workflow
  • jdFinish: The workflow will execute and finish the order if the finish object is used in the workflow. Even if the job is added after the finish object the workflow will end after the finish object. The Finish represents the end of the workflow and no further job execution is required to complete the workflow.
  • jsReTry: The workflow will retry to execute the job if it fails due to any reason. You can define no of maximum retries. If after the maximum retries the job fails then the order will be considered as failed and end the workflow. If after multiple retries the job will become successful then the order will complete successfully. 
  • jdTryCatch: The workflow with try and catch block is used when the execution of the job in the try block will fail the catch will execute and complete the Order successfully. If the catch will execute and fail then the order is considered as failed. 

To execute all the workflow in the folder 04_ErrorHandling please follow the below steps:

  1. Click on the folder04_ErrorHandling from the and expand any of the workflows. Here I am using jsReTry workflow.


  2. To add the order in the workflow. Click on the action menu of the workflow and click on Add order button from the drop-down menu.




  3. On clicking the Add Order. A popup window will appear. 
  4. You can add the Order ID or leave the Order Id value blank it will take the default Order Id to process the Order. Click on Submit button to add the Order



  5. To check the status of the Order click on the Workflow name with this new Order history panel will appear. 



  6. From the Order history panel, you can see the Order is successful and finished. Click on the Order ID to open the detail logs of execution.


  7. A log window will open and the order log will be displayed. The order log contains log output from all jobs executed by the order. 
  8. You can download the log file by clicking the Download button from the upper right corner of the log window. Also, you can expand and collapse the individual job output using the arrow button from the left corner of the log window.


Scheduled Execution

The JS7 - Schedules is used to  


  • No labels