“This is the fifth day of my participation in the Gwen Challenge in November. Check out the details: The Last Gwen Challenge in 2021.”

Author: Tangyuan

Personal blog: Javalover.cc

preface

We have seen how to create a flow using the Flowable UI and how to start a flow using the Flowable UI.

In this section, we will record some of the pits we stepped on in the previous study as encouragement.

directory

  1. The save button for the decision table is gray
  2. The interface sometimes freezes when editing the flow conditions of a sequence stream
  3. When the application was published, an error message was reported indicating that the extension component could not be resolved
  4. Error message “Error calculating juel script” while executing script task
  5. Error message dayBetween(null, NULL) is displayed during script task execution.
  6. After CMD command line started Flowable UI, the command line interface froze and the program did not start
  7. When saving a form (or other module), swipe the mouse over any edit box from right to left and the save dialog disappears
  8. Still save related, not a pit, but a pit

The body of the

1. The save button of the decision table is gray

This might seem like a normal thing to do, but I wasted a lot of time here, as shown below: it’s all grey

  • Possible cause: The key of the decision table is named incorrectly

    The name of the key in the decision table cannot be pure numbers, but must contain English characters or underscores. Otherwise, it cannot be saved.

    This is also found in Flowable website to see other people’s example, Flowable website introduction

  • Solution: The key in the decision table must be named with an underscore (_) instead of digits

I have a question: when I create the decision table, it is ok to name the key of the decision table with a number, but when I save it, it can not save it. Is this a bug?

Other modules, such as forms and processes, do not have this problem.

2. Sometimes the interface freezes when editing the flow conditions of a sequence stream

The sequence flow is the line arrow in the process, and the flow condition is the condition for the sequence flow to execute down, as shown below:

Click the flow condition to enter the following condition editing interface:

At this point, it is possible to click anywhere invalid, the interface is stuck;

  • Cause analysis: Unknown for now
  • Solution: Refresh and edit again

So here’s a nice piece of advice, go to the top left corner every now and then and click the Save button

3. When the application is released, an error message is displayed indicating that extension components cannot be parsed

Cannot resolve the name ‘extension’ to a(n) ‘Element declaration’ component

This problem is still quite baffling, finally through the Internet to check just know, originally is the directory has Chinese caused…

  • Possible cause: The Flowable UI project deployment directory contains Chinese characters
  • Solution: Do not include Chinese

So here’s another piece of advice: never deploy any project in a Chinese directory

4. Error message “Error in calculating juel script” is displayed when executing script task

When the script task is calculated after the process is started, an error message is displayed in the background: The JuEL script fails to be calculated

The detailed error description is as follows:

Error evaluating juel script: "org.joda.time.Days days=
org.joda.time.Days.daysBetween(vacationstartingfrom, vacationuntil);
execution.setVariable("amountOfVacationDays", days.getDays());" of activity id: sid-6880B1A3-B43A-4E77-AF22-090258640D94 of process definition id: a1:2:37543631-3aff-11ec-
a55f-0021ccd8e547
Copy the code

From the error report, we can see that there was an error in calculating the Juel script, but we did not use the Juel script

  • Cause analysis: CreatedThe script task, if not specifiedFormat of script, the default format will be usedjuel
  • Solution: Edit process, update script task script format asgroovy, as follows:

5. During script execution, an error message is displayed indicating that dayBetween(null, NULL) cannot be parsed due to mixed method parsing.

After the process is started and script tasks are calculated, the following error message is displayed in the background:

groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method org.joda.time.Days#daysBetween.

Cannot resolve which method to invoke for [null.null] due to overlapping prototypes between:
Copy the code
  • Cause analysis: This problem is simple, because we did not pass in the request form date data, directly submitted, so the background does not know which overload method to use
  • Solution: Make the request date mandatory in the request form so that problems can be detected early, rather than waiting for a background error

The steps are as follows:

  1. Start by editing the form, as shown below, and make the date field mandatory

  1. Then re-publish the application (see the previous section: How the Flowable UI starts the flow).
  2. At this point, we will initiate the process and execute the task, and we will find that if the date is not filled in, we cannot submit it

6. After the Flowable UI is started by CMD command line, the command line interface is stuck and the program is not started

This problem is obscure and not easy to find. After startup, I waited for a while to visit the interface and found no response. Then I looked at the command line output and found no output of the last log, such as how long it took to start and the monitored port, as shown below:

If your command line does not display the logs shown above after starting, then the command line is stuck

  • Cause analysis: The “Quick Edit mode” is enabled on CMD by default. When the mouse clicks any area of CMD, it automatically enters the edit mode and the output is blocked. This phenomenon is also known as suspended animation

  • The solution: There are two ways

      1. Temporary fix: On the CMD command line interface, press Enter to see that the last few lines of the log are printed and the interface is now accessible
      2. Clean up: CMD properties – properties – Options – Uncheck “Quick edit mode” and “insert mode” as shown below: Here I use Powershell, which is the same as CMD

However, after configuration according to the above figure, the command line interface cannot be located to the last line through the press enter, nor can you scroll up and down with the mouse wheel, but can only be moved up and down through the right slider.

7. When saving a form (or other modules), swipe the mouse over any edit box from right to left, and the save dialog box will disappear

This question, to be honest, is really uncomfortable, for me who like to use the mouse to edit all the content;

For example, in the picture below, I want to change the name of the form in the save form dialog box. I habitually use the mouse to select all from right to left in the edit box of the form name.

And when you pull it over your head, the whole dialog disappears.

  • Cause analysis: It may detect the mouse focus and click outside the dialog box (it should detect the pull operation), causing the dialog box to disappear automatically
  • Solution: get rid of the habit of pulling with the mouse, double-click directly select, or Delete the keyboard Delete

As I write this, I’m still pulling

8 or save relevant, not a pit, but also very pit

Because the Flowable UI is not automatically saved, and various misoperations can easily lead to the interface back or exit (for example, if you edit a flow and do a lot of content, you accidentally click the “X” in the upper right corner or the page is closed accidentally, and all of it will disappear).

It’s going to turn off the X here, and there’s no nice hint;

So get into the habit of clicking the save icon in the upper left corner every now and then;

For example, every time we read an article written by someone else, we tend to give a thumbs-up before leaving.

conclusion

Some of the above problems are easy to find, and some are not;

Like the Chinese directory, if you can’t find the answer online, it may take a long time to solve…

So here are a few habits, just for your reference:

  1. Do not deploy any programs in Chinese directories
  2. When the front and back ends interact with each other, the front and back ends must perform verification for mandatory data
  3. Make it a habit to save manually

Of course, there must be other pits, but MY side is not much contact at present, found these, we can leave a message below, discuss together