Checking for Variable Type

I’m a newbie in Camunda and recently began a project. What I want to do currently is check what type of variable the user has inputted and using this info, execute a certain function that uses that variable. The two possible types the user could input would be numeric or string in my case. Is there a way to check this through an external task method or is there an expression to use within the modeler sequence flow? If so, is there an example I can reference to?

Any help is appreciated, thank you.

So, a user enters a single variable, and this variable’s type is determined by the user?
Why not create a different variable for each type?

Due to a previous problem, I had to call them the same variable in order for a three-way gateway flow to work. When I had separate variables, it wouldn’t perform the external task I assigned it.

To get a better idea of what I’m trying to do, I’ve included what I have so far for my modeler flow. The variable the user can input could either be a name or an ID, but in order for me to return the BA info, I need to know if what I get is a string or a number.

This seems like a really weird problem - There’s no reason why that should happen. What was going wrong exactly and what where your trying to do?

At first, I was trying to allow the user to input yes, no or only the actual BA ID before the gateway. I checked for the boolean values of the variable decisionBool in the first two flows and the default flow would be where the BA ID was inputted, which was the variable businessAccID, then that ID is outputted back. However, I kept getting this error on my console:
camunda.CamundaClientException: Internal Server Error at camunda.CamundaClient.handleError( at camunda.TaskClient.completeTask( at at services.DatafeedEventsService.handleEvents( at services.DatafeedEventsService.lambda$null$2( at java.util.concurrent.CompletableFuture.uniApply( at java.util.concurrent.CompletableFuture$UniApply.tryFire( at java.util.concurrent.CompletableFuture.postComplete( at java.util.concurrent.CompletableFuture$ at java.util.concurrent.ThreadPoolExecutor.runWorker( at java.util.concurrent.ThreadPoolExecutor$ at 500

In the Cockpit, the variable was retrieved and given its value but it wouldn’t move past the user task. Then I changed the businessAccID into decisionBool, and it worked.

can you upload your process model - sounds like you’ve made some mistakes somewhere that doesn’t sounds like it be a hard thing to implement with the engine,
That error you posted - where was it thrown by an external task or by the engine itself?

Here is the model that I started with. It was where I ran my war file, so I think it was by the external task.
DSOM-lights.bpmn (7.9 KB)