Simplified Job Execution for IBM ICM v10 using REST APIs
https://developer.ibm.com/api/view/id-689:title-Incentive_Compensation_Management
pip install easy-icm-runner
This project can be used as a module within your custom program, or standalone from the command line. Below we demonstrate sample usage:
The snippet below demonstrates running a job syncronously in python code. Such a method will be desirable for incorporating an ICM job step into a more complex application, or such tasks as integrating your own secret and configuration management.
from icm_runner import Runner
job_runner = Runner()
# get an authentication token to use in remaining operations
job_runner.get_token(username='icm username', password='icm password')
# start job
activity_id = job_runner.run_process_by_name(model_name='model name', process_name='process name',follow=True)
# poll for status until complete
job_runner.monitor_activity(model_name='model name', activity_id=activity_id, interval_mins=0.1)
For those of you who are not budding pythonistas, or just looking for a simple solution to job scheduling we also allow a command line entrypoint.
$ python -m icm_runner -u "icm username" -p "icm password" -m "model name" -j "process name"