-
Notifications
You must be signed in to change notification settings - Fork 0
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
BXMSDOC-5098: Added Managing Log files chapter in process designer doc #12
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW all of this is true also for other containers than JWS like EAP for example. Do we already have that there? If so, then it would be good to share the content.
|
||
You can use the `jbpm-audit` module that provides an event listener and allows you to store the information directly in a database using JPA or Hibernate. The log data is stored as follows: | ||
|
||
* Process instance as `processinstancelog` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use ProcessInstanceLog
as the name.
|
||
|=== | ||
|
||
* Element instance as `nodeinstancelog` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NodeInstanceLog
* Variable instance as `variableinstancelog` | ||
+ | ||
[id='fields_variableinstancelog_{context}'] | ||
.Fields of the variableinstancelog table |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VariableInstanceLog
|End date of a process instance | ||
|Yes | ||
|
||
|`processid` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would generally go for lower camel case even for the name of the columns as this is how it appears in the code, so here it would be processId
for example.
[id='logging-events-database-proc'] | ||
= Logging events to database | ||
|
||
You can log an event to a database that occurs on runtime in a process instance, element instance or variable instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
element instance -> node instance
<groupId>org.jbpm</groupId> | ||
<artifactId>jbpm-audit</artifactId> | ||
<version>6.5.0.Final-redhat-2</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be probably moved to the log-process-instance-con.adoc
where you speak about You can use the jbpm-audit module that...
And also please as a version just put there either a variable referring to the current version or some kind of placeholder that will just explain that the version a user is currently using should be specified there.
private EntityManagerFactory emf; | ||
|
||
private AuditLogService auditLogService; | ||
@PostConstruct |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@PostConstruct
is not relevant here as we don't have to use CDI/EJB framework. You can omit it.
org.jbpm.executor.commands.LogCleanupCommand | ||
---- | ||
|
||
. Click *Add Parameter* if you wish to use the parameters listed above. In the key section, enter a parameter name. In the value section, enter true or false, depending on the desired outcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you wish to use the parameters listed above
Where are those parameters?
…tent to eap and process designer user stories
@MarianMacik thanks for providing the comments. I have made the changes as suggested, can you please review and provide your approval. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding @sutaakar to verify some things.
org.jbpm.executor.commands.LogCleanupCommand | ||
---- | ||
|
||
. Click *Add Parameter* if you wish to use the <<logcleanupcommand_parameters_{context}, parameters>>, enter a parameter in the key section and enter true or false in the value section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all parameters have true/false as their value. So I would just state here enter the parameter value in the value section or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made this change
<artifactId>jbpm-audit</artifactId> | ||
<version>{PRODUCT_VERSION_LONG}-redhat-2</version> | ||
</dependency> | ||
---- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This kind of information cannot be really set when installing it on EAP or JWS. It can only be set when running a process engine inside a custom application. So I wouldn't add it into EAP or JWS install guides but probably to the guide which is about running engine as a part of a custom app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, this setup is already available in Kie server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Therefore, I would suggest to move this to another chapter, definitely somewhere where we have configuration of jBPM engine as a part of a custom app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarianMacik and @sutaakar, thanks for providing the inputs, I will be moving this section to process engine doc
<groupId>ch.qos.logback</groupId> | ||
<artifactId>logback-classic</artifactId> | ||
<version>1.x</version> | ||
</dependency> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, this cannot be configured for Business Central or KIE Server.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving this section to process engine doc
RuntimeEngine runtime = singletonManager.getRuntimeEngine(EmptyContext.get()); | ||
KieSession ksession = runtime.getKieSession(); | ||
AuditLoggerFactory.newInstance(Type.JPA, ksession, null); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also belongs to an engine section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to process engine doc
.Procedure | ||
. Map log classes to the data source that enables the data source to accept the log entries. | ||
* On {EAP}, edit the data source properties in the `persistence.xml` file. | ||
[source,code] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The persistence.xml of KIE Server already contains this so I guess it should be present only in an engine section.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving to process engine doc
<property name="hibernate.hbm2ddl.auto" value="update"/> | ||
<property name="hibernate.show_sql" value="true"/> | ||
<property name="hibernate.transaction.manager_lookup_class" | ||
value="org.hibernate.transaction.BTMTransactionManagerLookup"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MarianMacik This looks like a deprecated configuration. IMHO the hibernate.transaction.jta.platform should be used here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/> | ||
<property name="hibernate.max_fetch_depth" value="3"/> | ||
<property name="hibernate.hbm2ddl.auto" value="update"/> | ||
<property name="hibernate.show_sql" value="true"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we rather set this to false/skip this property?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
xmlns="http://java.sun.com/xml/ns/persistence"> | ||
|
||
<persistence-unit name="org.jbpm.persistence.jpa"> | ||
<provider>org.hibernate.ejb.HibernatePersistence</provider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may rather use org.hibernate.jpa.HibernatePersistenceProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
|No, it is used with other parameters. | ||
|
||
|`EmfName` | ||
|Persistence unit name that is used to perform operation deletion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use .... to perform delete operation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
[id='clean-log-proc'] | ||
= Removing logs from the database | ||
|
||
Use `LogCleanupCommand` executor command to clean up the data that is using the database space. The `LogCleanupCommand` consists of logic to automatically clean up all or selected data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use "which" instead of "that".
Use LogCleanupCommand
executor command to clean up the data which is using the database space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
.Procedure | ||
. In {CENTRAL}, go to *Deploy* > *Jobs*. | ||
. Click *New Job*. | ||
. Enter a name, due date and time and following into the *Type* text field. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question:
In this Enter a name, due date and time and following into the Type text field, what is the following? Is it a command that we are including in the Type text field?
Suggestion: Enter a name, due date, time and, the following command into the Type text field.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, following is the command.
Have made the suggested change
org.jbpm.executor.commands.LogCleanupCommand | ||
---- | ||
|
||
. Click *Add Parameter* if you wish to use the <<logcleanupcommand_parameters_{context}, parameters>>, enter a parameter in the key section and enter a parameter value in the value section. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Original: . Click Add Parameter if you wish to use the <<logcleanupcommand_parameters_{context},
Suggestion: . Click Add Parameter if you want to use the <<logcleanupcommand_parameters_{context},
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
* *Per request strategy* allows automatic removal when a request is terminated. | ||
* *Per process instances* are automatically removed when a process instance is mapped to a session that is completed or aborted. | ||
|
||
In order to keep track of process instances, {PRODUCT} provides audit data tables. There are two ways to manage and maintain the audit data tables, including cleaning up the jobs <<setup-auto-cleanup-proc, automatically>> and <<manual-cleanup-con, manually>>. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add "the".
In order to keep the track of process instances,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @hmanwani-rh, I have added minor suggestions. Otherwise looks good to me. Your content is really clean and clear. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I agree with moving some of the parts to process engine doc.
Thank you @kaldesai |
Thanks Marian, other sections will be tracked for process engine as part of https://issues.redhat.com/browse/BXMSDOC-5704 |
* BXMSDOC-8060 Migration of standalone Business Central from Thorntail to EAP Bootable Jar (#11) * BXMSDOC-8060 initial commit * Removes internal notes * Replaces dashes with colons * Post QA feedback * BXMSDOC-8312: Add note to enable user and group management (#12) * BXMSDOC-8312 Adds note to enable user and group management * Fixes typo * Update doc-content/enterprise-only/installation/run-dc-standalone-proc.adoc Incorporating peer review suggestion. Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> * BXMSDOC-8312: Add note to enable user and group management (#12) * BXMSDOC-8312 Adds note to enable user and group management * Fixes typo * Update doc-content/enterprise-only/installation/run-dc-standalone-proc.adoc Incorporating peer review suggestion. Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com>
…che#4043) * BXMSDOC-8312 Adds note to enable user and group management * Fixes typo * Update doc-content/enterprise-only/installation/run-dc-standalone-proc.adoc Incorporating peer review suggestion. Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com> Co-authored-by: emmurphy1 <30830712+emmurphy1@users.noreply.github.com>
See JIRA: https://issues.redhat.com/browse/BXMSDOC-5098
Rendered docs:
Designing business processes in Business Central