Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc: fix doc #3945

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions docs/docusaurus/docs/bpmn/ch02-GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ The example we’ll build is a simple *holiday request* process:

First, we create a new Maven project through *File → New → Other → Maven Project*

![getting.started.new.maven](assets/bpmn/getting.started.new.maven.png)
![getting.started.new.maven](../assets/bpmn/getting.started.new.maven.png)

In the next screen, we check '*create a simple project (skip archetype selection)*'

![getting.started.new.maven2](assets/bpmn/getting.started.new.maven2.png)
![getting.started.new.maven2](../assets/bpmn/getting.started.new.maven2.png)

And fill in some *'Group Id'* and *'Artifact id'*:

![getting.started.new.maven3](assets/bpmn/getting.started.new.maven3.png)
![getting.started.new.maven3](../assets/bpmn/getting.started.new.maven3.png)

We now have an empty Maven project, to which we’ll add two dependencies:

Expand Down Expand Up @@ -126,11 +126,11 @@ The **ProcessEngine** object is then created using this configuration (line 17).

You can now run this. The easiest way in Eclipse is to right-click on the class file and select *Run As → Java Application*:

![getting.started.run.main](assets/bpmn/getting.started.run.main.png)
![getting.started.run.main](../assets/bpmn/getting.started.run.main.png)

The application runs without problems, however, no useful information is shown in the console except a message stating that the logging has not been configured properly:

![getting.started.console.logging](assets/bpmn/getting.started.console.logging.png)
![getting.started.console.logging](../assets/bpmn/getting.started.console.logging.png)

Flowable uses [SLF4J](http://www.slf4j.org/) as its logging framework internally. For this example, we’ll use the log4j logger over SLF4j, so add the following dependencies to the pom.xml file:

Expand All @@ -155,7 +155,7 @@ Log4j needs a properties file for configuration. Add a *log4j.properties* file t

Rerun the application. You should now see informative logging about the engine booting up and the database schema being created in the database:

![getting.started.console.logging2](assets/bpmn/getting.started.console.logging2.png)
![getting.started.console.logging2](../assets/bpmn/getting.started.console.logging2.png)

We’ve now got a process engine booted up and ready to go. Time to feed it a process!

Expand All @@ -170,7 +170,7 @@ these different steps to each other. Through this, the BPMN 2.0 standard allows

The process definition we’ll use is the following:

![getting.started.bpmn.process](assets/bpmn/getting.started.bpmn.process.png)
![getting.started.bpmn.process](../assets/bpmn/getting.started.bpmn.process.png)

The process should be quite self-explanatory, but for clarity’s sake let’s describe the different bits:

Expand Down Expand Up @@ -358,7 +358,7 @@ Using the task identifier, we can now get the specific process instance variable

Which, if you run this, should look something like this:

![getting.started.console.logging3](assets/bpmn/getting.started.console.logging3.png)
![getting.started.console.logging3](../assets/bpmn/getting.started.console.logging3.png)

The manager can now **complete the task**. In reality, this often means that a form is submitted by the user. The data from the form is then passed as *process
variables*. Here, we’ll mimic this by passing a map with the 'approved' variable (the name is important, as it’s used later on in the conditions of the sequence flow!) when the task is completed:
Expand Down Expand Up @@ -400,7 +400,7 @@ When the *execution* arrives at the *service task*, the class that is referenced

When running the example now, the logging message is shown, demonstrating the custom logic is indeed executed:

![getting.started.console.logging4](assets/bpmn/getting.started.console.logging4.png)
![getting.started.console.logging4](../assets/bpmn/getting.started.console.logging4.png)

### Working with historical data

Expand Down
16 changes: 8 additions & 8 deletions docs/docusaurus/docs/bpmn/ch04-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: The Flowable API

The engine API is the most common way of interacting with Flowable. The main starting point is the ProcessEngine, which can be created in several ways as described in the [configuration section](bpmn/ch03-Configuration.md#creating-a-processengine). From the ProcessEngine, you can obtain the various services that contain the workflow/BPM methods. ProcessEngine and the services objects are thread safe, so you can keep a reference to one of those for a whole server.

![api.services](assets/bpmn/api.services.png)
![api.services](../assets/bpmn/api.services.png)

ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

Expand Down Expand Up @@ -211,7 +211,7 @@ The methods follow the naming convention of the regular process variables:

The following BPMN diagram shows a typical example:

![api.transient.variable.example](assets/bpmn/api.transient.variable.example.png)
![api.transient.variable.example](../assets/bpmn/api.transient.variable.example.png)

Let’s assume the 'Fetch Data' service task calls some remote service (for example, using REST). Let’s also assume some configuration parameters are needed and need to be provided when starting the process instance. Also, these configuration parameters are not important for historical audit purposes, so we pass them as transient variables:

Expand Down Expand Up @@ -475,27 +475,27 @@ When using the in-memory H2 database for unit tests, the following instructions

Suppose we have put a *breakpoint* somewhere in our unit test (in Eclipse this is done by double-clicking in the left border next to the code):

![api.test.debug.breakpoint](assets/bpmn/api.test.debug.breakpoint.png)
![api.test.debug.breakpoint](../assets/bpmn/api.test.debug.breakpoint.png)

If we now run the unit test in *debug* mode (right-click in test class, select 'Run as' and then 'JUnit test'), the test execution halts at our breakpoint, where we can now inspect the variables of our test as shown in the right upper panel.

![api.test.debug.view](assets/bpmn/api.test.debug.view.png)
![api.test.debug.view](../assets/bpmn/api.test.debug.view.png)

To inspect the Flowable data, open up the *'Display'* window (if this window isn’t there, open Window→Show View→Other and select *Display*.) and type (code completion is available) org.h2.tools.Server.createWebServer("-web").start()

![api.test.debug.start.h2.server](assets/bpmn/api.test.debug.start.h2.server.png)
![api.test.debug.start.h2.server](../assets/bpmn/api.test.debug.start.h2.server.png)

Select the line you’ve just typed and right-click on it. Now select 'Display' (or execute the shortcut instead of right-clicking)

![api.test.debug.start.h2.server.2](assets/bpmn/api.test.debug.start.h2.server.2.png)
![api.test.debug.start.h2.server.2](../assets/bpmn/api.test.debug.start.h2.server.2.png)

Now open up a browser and go to [<http://localhost:8082>](http://localhost:8082), and fill in the JDBC URL to the in-memory database (by default this is jdbc:h2:mem:flowable), and hit the connect button.

![api.test.debug.h2.login](assets/bpmn/api.test.debug.h2.login.png)
![api.test.debug.h2.login](../assets/bpmn/api.test.debug.h2.login.png)

You can now see the Flowable data and use it to understand how and why your unit test is executing your process in a certain way.

![api.test.debug.h2.tables](assets/bpmn/api.test.debug.h2.tables.png)
![api.test.debug.h2.tables](../assets/bpmn/api.test.debug.h2.tables.png)

## The process engine in a web application

Expand Down
2 changes: 1 addition & 1 deletion docs/docusaurus/docs/bpmn/ch06-Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ If no image is provided in the deployment, as described in the [previous section

The resource can be retrieved in exactly the same way as when [an image is provided](bpmn/ch06-Deployment.md#providing-a-process-diagram) in the deployment.

![deployment.image.generation](assets/bpmn/deployment.image.generation.png)
![deployment.image.generation](../assets/bpmn/deployment.image.generation.png)

If, for some reason, it’s not necessary or desirable to generate a diagram during deployment, the isCreateDiagramOnDeploy property can be set on the process engine configuration:

Expand Down
12 changes: 6 additions & 6 deletions docs/docusaurus/docs/bpmn/ch07a-BPMN-Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ BPMN is a widely accepted and supported standard notation for representing proce

Create a new XML file (*right-click on any project and select New→Other→XML-XML File*) and give it a name. Make sure that the file **ends with .bpmn20.xml or .bpmn**, otherwise the engine won’t pick it up for deployment.

![new.bpmn.procdef](assets/bpmn/new.bpmn.procdef.png)
![new.bpmn.procdef](../assets/bpmn/new.bpmn.procdef.png)

The root element of the BPMN 2.0 schema is the definitions element. Within this element, multiple process definitions can be given (although our advice is to have only one process definition in each file, as this simplifies maintenance later in the development process). An empty process definition looks like the one shown below. Note that the minimal definitions element only needs the xmlns and targetNamespace declaration. The targetNamespace can be anything and is useful for categorizing process definitions.

Expand Down Expand Up @@ -68,7 +68,7 @@ The use case is straightforward: we have a company, let’s call it BPMCorp. In

The business process as described above can be defined graphically using the [Flowable Designer](bpmn/ch13-Designer.md#eclipse-designer). However, for this tutorial, we’ll type the XML ourselves, as we’ll learn the most this way at this stage. The graphical BPMN 2.0 notation of our process looks like this:

![financial.report.example.diagram](assets/bpmn/financial.report.example.diagram.png)
![financial.report.example.diagram](../assets/bpmn/financial.report.example.diagram.png)

What we see is a [none Start Event](bpmn/ch07b-BPMN-Constructs.md#None-start-event) (circle on the left), followed by two [User Tasks](bpmn/ch07b-BPMN-Constructs.md#user-task): *'Write monthly financial report'* and *'Verify monthly financial report'*, ending in a [none end event](bpmn/ch07b-BPMN-Constructs.md#None-end-event) (circle with thick border on the right).

Expand Down Expand Up @@ -158,7 +158,7 @@ After the task is created, the startProcessInstanceByKey method will return beca

We can now throw this all together and create a simple Java program. Create a new Eclipse project and add the Flowable JARs and dependencies to its classpath (these can be found in the *libs* folder of the Flowable distribution). Before we can call the Flowable services, we must first construct a ProcessEngine that gives us access to the services. Here we use the *'standalone'* configuration, which constructs a ProcessEngine that uses the database also used in the demo setup.

You can download the process definition XML [here](assets/bpmn/FinancialReportProcess.bpmn20.xml). This file contains the XML shown above, but also contains the necessary BPMN [diagram interchange information](bpmn/ch06-Deployment.md#generating-a-process-diagram) to visualize the process in the Flowable tools.
You can download the process definition XML [here](../assets/bpmn/FinancialReportProcess.bpmn20.xml). This file contains the XML shown above, but also contains the necessary BPMN [diagram interchange information](bpmn/ch06-Deployment.md#generating-a-process-diagram) to visualize the process in the Flowable tools.

public static void main(String[] args) {

Expand Down Expand Up @@ -202,11 +202,11 @@ We could also use the task query API to get the same results using the name of t
As we’ve configured our ProcessEngine to use the same database that the demo setup is using, we can now log into the [Flowable IDM](http://localhost:8080/flowable-idm/). Login as admin/test and create 2 new users *kermit* and *fozzie*, and give both of them the *Access the workflow application* privilege. Then create 2 new organization groups named *accountancy* and *management*, and add fozzie to the new accountancy group and add kermit to the management group.
Now login with fozzie to the [Flowable task](http://localhost:8080/flowable-task/) application, and we will find that we can start our business process by selecting the Task App, then its *Processes* page and selecting the *'Monthly financial report'* process.

![bpmn.financial.report.example.start.process](assets/bpmn/bpmn.financial.report.example.start.process.png)
![bpmn.financial.report.example.start.process](../assets/bpmn/bpmn.financial.report.example.start.process.png)

As explained, the process will execute until reaching the first user task. As we’re logged in as fozzie, we can see that there is a new candidate task available for him after we’ve started a process instance. Select the *Tasks* page to view this new task. Note that even if the process was started by someone else, the task would still be visible as a candidate task to everyone in the accountancy group.

![bpmn.financial.report.example.task.assigned](assets/bpmn/bpmn.financial.report.example.task.assigned.png)
![bpmn.financial.report.example.task.assigned](../assets/bpmn/bpmn.financial.report.example.task.assigned.png)

### Claiming the task

Expand All @@ -220,7 +220,7 @@ The task is now in the **personal task list of the user that claimed the task**.

In the Flowable Task app, clicking the *claim* button will call the same operation. The task will now move to the personal task list of the logged on user. You’ll also see that the assignee of the task changed to the current logged in user.

![bpmn.financial.report.example.claim.task](assets/bpmn/bpmn.financial.report.example.claim.task.png)
![bpmn.financial.report.example.claim.task](../assets/bpmn/bpmn.financial.report.example.claim.task.png)

### Completing the task

Expand Down
Loading