I already use BotCity¶
If you already use BotCity and have automation processes in the orchestrator, you just need to make a small change in the automation code to start reporting items.
Updating the code of an existing automation¶
Simply modify your call to finish_task
to include the values related to the processed items during the execution of the process.
maestro.finish_task(
task_id=execution.task_id,
status=AutomationTaskFinishStatus.SUCCESS,
message="Task Finished OK.",
total_items=100, # Total number of items processed
processed_items=90 # Number of items processed successfully
)
Tip
Remember to update the BotCity Maestro SDK dependency to the latest version:pip install --upgrade botcity-maestro-sdk
You may also need to adjust the version being used in the requirements.txt
file of the robot.
maestro.finishTask(
botExecution.getTaskId(),
"Task Finished OK.",
FinishStatus.SUCCESS,
100, // Total number of items processed
90, // Number of items processed successfully
10 // Number of items processed with failure
);
Tip
Remember to update the BotCity Maestro SDK Java to the latest version.
<dependencies>
<dependency>
<groupId>dev.botcity</groupId>
<artifactId>maestro-sdk</artifactId>
<version>2.2.0</version>
</dependency>
</dependencies>