Custom application integration

Hi

I am looking for best practice guidance in terms of handling UI that sits outside of Camunda.
Say I have a UI that will show different elements of a screen depending on the “status” of the current process…

The two options could be:

1 - Persist a status via a task in the bpmn to the DB before or after some task and retrieve directly from the db directly to pass onto the UI
2 - Save the current status as a variable and query the rest API to retrieve the variables

What are the thoughts of using this status on the UI to drive what actions a user could perform (via an api) back into a Camunda to complete the current task.

Does Camunda persist changes to variables ? i.e task 1 sets it to value x and task 2 sets it to y. Could one look back at the history to see the values.

Any thoughts on the pro’s and con’s on the above…?
Are there any examples that make use of a custom app over embedding forms ?

@steel are you trying to build Form Wizards that are based on the workflow of camunda?

@StephenOTT - Nah - they are not really forms (data capture) necessarily … it could be a button to trigger a cancel or a button to trigger another action (that may populate variables differently) and pass onto camunda)

The display part could differ - i.e show this piece of information to the user if item x in the workflow has been completed, otherwise hide it…

Not sure if my thinking around this is correct … but I somehow feel I need to give the UI info (ie a status) on where the process is in order to display the correct pieces of into to the user.

The UI itself is used for general business information related to the process and not just to complete a users task…