Replies: 11 comments 3 replies
-
I guess you have still an empty bean.xml file, which may cause the problem. Try to add the alternative also into the beans.xml file located in your /WEB-INF/ folder <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/beans_2_0.xsd"
bean-discovery-mode="all" version="2.0">
<alternatives>
<class>com.foo.AccessAdapterNz</class>
</alternatives>
</beans> In general it is not a good idea to replace the AccessAdapter as this class implements the core functionality for securing data. I would recommend you to implement instead an additional Adapter where you add your custom logic. |
Beta Was this translation helpful? Give feedback.
-
The Imixs-Workflow engine follows a very fine grained access management regarding read and write access. You can set a Access-Controll-List (ACL) on each process instance processed by the Imixs Workflow engine. The workitem properties Think about something like a workflow "application for leave" in an enterprise. The requester and the HR-department should have read access only. The manager should have write access to approve / reject the request. So each process instance have different read and write access settings depending on the requester and his manger. Its hard to bring this into a database schema. This is why I did not recommand to drop the AccessAdaper without need. I think what you want to archive is a more dynamic role-resolver. Image you set the See the section Inject Custom User Groups. Your implementation may look something like this: @Stateless
@LocalBean
public class TeamLookupService {
@Resource
SessionContext ctx;
/**
* This method updates the UserGroup List and lookup user-groups from a external service.
*/
public void onUserGroupEvent(@Observes UserGroupEvent userGroupEvent) {
// lookup custom groups the user is member of....
String[] groups = findOrgunits(userGroupEvent.getUserId());
userGroupEvent.setGroups(Arrays.asList(groups));
}
.....
} Each time a user tries to access a specific process Instance your custom |
Beta Was this translation helpful? Give feedback.
-
Hi Ralph I tried to follow your advices so I found out that
is called only if I set an ACL to a process/model event (via worflowService.getEvents()), so modifying the process I was able to filter the events a user can see/use depending on his roles. Following some question and maybe a bug:
Is the last "$writeaccess:"admin" without AND/OR correct? Because without it the right items are returned. Ciao :-) |
Beta Was this translation helpful? Give feedback.
-
Hi, The To your questions:
You can easily check the situation of a workitem if you know the $uniqueid by calling the Rest API: http://localhost:8080/api/document/{your-unique-id} And also you can use the Imixs-Admin client to test some of your search queries. But always keep in mind: If you set the $readaccess than you need to ensure that you have access to the document you request. Only in case you are member of the role |
Beta Was this translation helpful? Give feedback.
-
Hi, I passed some more time "playing" with your framework :-) so ... speaking about 3) I found that the reason was that the default operator for lucene is AND, and not OR: now that I changed the configuration everything works fine.
Enzo |
Beta Was this translation helpful? Give feedback.
-
Hello, yes, the default operation is AND as this is what users expect using full text search. In a hard coded Lucene Query you better always work with boolean operators to make the query more clear. Async Calls are quite simple. You add a so called 'Boundery Event' to your Task and connect this event with an existing Imixs-Event accociated with this task: To the BounderyEvent you than add a timer definition and define the duration interval in milliseconds This will threat the event as a scheduled event processed by the The
This will enable the processor 10 seconds after deployment. You will see the corresponding processing messages in your server log file. Also you can check with the Admin Client if open events exits |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Hi, in your example code you trigger the event directly. So no asynchronous processing is performed here.
A typical use case for this kind of modelling is calling external microservices. Depending of the result you can decide to stay in the current task or to continue the process. |
Beta Was this translation helpful? Give feedback.
-
Hi Ralph, just to know if exists a way/functionality to list running vs ended processes. Let's say I deployed a set of different process-definitions/model-versions: is there a way to search for |
Beta Was this translation helpful? Give feedback.
-
Hi,
In the modeller you can change the type (e.g. to 'workitemarchive') if a process is completed: Note: a process instance is always bound to a Task in your model. So you usually have a model end task (setting the ACL and type attribute into a final status) |
Beta Was this translation helpful? Give feedback.
-
Hello
I'm using imixs-jsf-example project for evaluating imixs.
The application is running on a Wildfly 26.1.0.Final instance and what now I'm trying to do is
to implement an alternative of org.imixs.workflow.engine.adapters.AccessAdapter named "org.imixs.application.adapter.AccessAdapterNz"
If i use
the original bean (org.imixs.workflow.engine.adapters.AccessAdapter) is not overridden and in the workflowKernel.adapterRegister i found:
If I add a priority like
in the workflowKernel.adapterRegister i found only AccessAdapterNz and
are both missing.
So in the first case my custom implementation is missing and in the second the DemoAdapter is missing causing exception during the execution of an event/signal.
Does someone have any clues? :-)
Beta Was this translation helpful? Give feedback.
All reactions