extract_job_param
Related Concepts: Integration Configuration & Script Parameters
Get the value of an job parameter. Each job has parameters that are filled when the job is configured. This method allows to extract the value of a selected parameter of the currently running job.
param_value= siemplify.extract_job_param(
param_name,
default_value=None,
input_type=str,
is_mandatory=False,
print_value=False)
Parameters:
Param Name | Param Type | Possible Values | Comments | Mandatory Parameter |
---|---|---|---|---|
param_name | string | some_param_value | The name of the parameter to fetch | Yes |
default_value |
|
|
The default value of the parameter. The given value will be returned if the parameter was not set (if is_mandatory is set to False). Defaults to None. | No |
input_type |
|
|
The type of the parameter. The returned value will be cast to the selected input type. Defaults to str. | No |
is_mandatory | boolean | True/False | Whether the parameter is mandatory. If set to True and the parameter was not filled, an exception will be raised. Default to False. | No |
print_value | boolean | True/False | Whether to output the fetched value of the parameter to the logs. Default to False. | No |
Return Type
As passed in input_type
Sample Code
from SiemplifyJob import SiemplifyJob
siemplify = SiemplifyJob()
param_value= siemplify.extract_job_param(
"Logs Folder",
default_value="C:\\Siemplify_Server\\Scripting\\JobLogs",
input_type=str,
is_mandatory=False,
print_value=False)
Result Behavior
The value of the selected parameter will be returned, casted to selected type.
Result Value
C:\Siemplify_Server\Scripting\SampleJob\Logs