Question

Possibility to change datatype date to string when defining a filter in worfklow designer?

  • 16 April 2024
  • 3 replies
  • 39 views

Badge +1

Hi everyone

 

CONTEXT

im currently completing a workflow when creating a new customer order where customer and the  date_entered are the same, this will show a notification that order(s) already exist with the same  date_entered! (read: this is said to give some context)

 

When starting with a service task with READ operation, i want to define the filter with two keys by  looking up the value in Camunda language(7.1)

 

THE ISSUE

the query builder doesnt give us the right to change the datatype date to a string. This is needed as i want to look up the value by using camunda language (see picture). Is there a solution without using parameters in the worfklow designer

 

 

kr


3 replies

Userlevel 3
Badge +5

You could try to use parameters in the READ task to accomplish this

 

 

Since DateEntered is a date time field you may have to format of the value to match the format “yyyy-mm-dd-hh.mm.ss.00000 00” for the search to work properly

 

Badge +1

Scenario 1

@kamnlk Thanks for the response! Is it possible to put in the parameter for the Key Date a Value with <> date (read: i try to get the value that’s not equal to XXX) 

 

Scenario 2

If not possible, how do u gain this value using filter: the query builder doesnt give us the right to change the datatype date to a string. This is needed as i want to look up the value by using camunda language (see picture). Is there a solution without using parameters in the worfklow designer

Userlevel 3
Badge +5

Scenario 1:

Its not possible to use <>  with parameters but, You could do something like check the availability of the customer order records and check the result using a gateway and if it does not exist and proceed to do the rest of the tasks

sample workflow setup
gateway condition 

 

Scenario 2:
Lets Assume that the CustomerNo is 20230810090640 then we could use a filter expression similar to following to get the behavior
Please note this syntax needs to be entered manually to the filter text box as variable substitution is not supported in the query builder

(customer_no = '${CustomerNo}' AND date_entered = to_date('${CustomerNo}','MMDDYYYYHHMISS'))

 

Reply