Run administration tasks directly from the camunda 7 cockpit using generated mini-processes.
This lib/spring-boot-auto-config allows you to easily and fast generate and deploy single-service-task processes that can be started from the camunda-webapp/tasklist.
Doing so enables you to implement administration/house-keeping jobs as a process, use camundas form/ui and run tasks controlled with the full power of the engine cockpit, including error handling and analysis.
Once you included the lib in your camunda spring boot application, create an AdminProcess bean like this:
@Bean
fun helloWorldAdminProcess(): AdminProcess {
val foo = StringField("foo", "Foo - enter your name")
val date = DateField("date", "Date - select some magic")
return adminProcess(
activityId = "helloWorld",
label = "Hello World 2",
formFields = listOf(foo, date)
) {
val variables = CamundaBpmData.reader(it)
logger.info { """ Hi, I am the process running with:
* foo: ${variables.get(foo)}
* date: ${variables.get(date)}
""".trimIndent()
}
}
}
And you are done!
The generated model looks like this:
You can run the process in the webapp:
And fill out the form: