equivalent of UserEntityManager of Activiti in Camunda - user-management

I'm in the process of moving from Activiti to Camunda.For user management tasks we were using http://javadox.com/org.activiti/activiti-engine/5.16/org/activiti/engine/impl/persistence/entity/UserEntityManager.html#findUserInfoByUserIdAndKey(java.lang.String, java.lang.String). So while searching I came across DBIdentityServiceProvider class .( http://javadox.com/org.activiti/activiti-engine/5.16/org/activiti/engine/impl/persistence/entity/UserEntityManager.html#findUserInfoByUserIdAndKey(java.lang.String, java.lang.String) Is this the suitable to class ?
Thanks,
masha

You probably want to use the org.camunda.bpm.engine.IdentyService. This service manages Users and Groups in Camunda. You find it's JavaDoc here:
https://docs.camunda.org/javadoc/camunda-bpm-platform/7.4/org/camunda/bpm/engine/IdentityService.html

Related

Spring-Statemachine configuration

I am not sure this is the correct place to ask this question but I could not see a forum link in spring-statemachine project(http://projects.spring.io/spring-statemachine/) to ask a question to the developers, I hope this is the correct way to do it.
For a while I wrote a blog,
Extremely Axajified Web Application
concerning about extremely asynchronous web applications, using Spring Webflow with those and the limitations of Spring Webflow for these sort of projects.
In my proposed solution, I used extensively state machine principles. At the timeframe that I wrote this blog there wasn't an out of the box State Machine that I can use, so I implemented my own version of it.
Now to my surprise, I just saw Spring Statemachine project and I considering to convert my sample application to use the Spring Statemachine framework.
I have two questions to ask before really starting investing effort to the subject. I checked the samples of the Spring Statemachine, it seems that the configuration of the State Machine is done via Java Code.
Is this only possible method, in my sample application, I am reading an UML Model (XMI) and create via Eclipse M2T a Spring configuration file to startup the application.
I find it is for practical uses to complex for the end user to configure a complex State Machine via Java code. For this purpose I used graphical user interfaces to create UML model of the State Machine and convert this to Spring application context, so it will be easier to understand for the end user.
Which you can see here.
UML Model (unfortunately Stack Overflow is not letting me post extra link so please use "#sm_model" at the end of the previous link)
Eclipse M2T UML Model conversion (see above "#m2t")
So is it possible to provide an XML file and configure Spring Statemachine with it? I can naturally create Java classes via M2T but I have a feeling end result will be nearly unreadable for end user for complex projects.
Second question I like to ask, can Spring Statemachine support "Nested Statemachines", I found in the project web site a hint about the possibility but in the existing sample project I could not find a concrete implementation.
Biggest hurdle for the usage of a State Machine in a practical web application is the "State Explosion" and best way to deal with it, is the "Nested Statemachines".
Does Spring Statemachine support this concept.
You can find more details about what I mean with "State Explosion" and "Nested StateMachines" in the following links.
State Explosion (see above "#stateexplosion")
Nested Statemachines (see above "#nested_sm")
I hope this was the correct place to ask these questions.
Thx for the answers
Sorry for late answer, I just noticed this tagged question.
We don't yet have any functionality to define machine config outside of annotation based config model(javaconfig). Xml config is in our roadmap and you can track its status in ticket https://github.com/spring-projects/spring-statemachine/issues/78.
For your second question, yes we support nested states and even orthogonal regions. Showcase example shows relatively complex scenarios how nested states and transitions between those can be used http://docs.spring.io/spring-statemachine/docs/1.0.0.RC1/reference/htmlsingle/#statemachine-examples-showcase.

Best way to inject Principal info into n-tier ASP MVC 5 using Unity DI and not using OWIN

I'm writing an n-tier ASP MVC 5 app with Entity Framework in the data access layer. Bottom line is that I want an easy way to get the current user information, which is available in the Presentation Layer's HttpContext, into my Data Access Layer(repository), where it is not. Obviously, this sounds like a job for my DI container (Unity 3). My first reaction was to try creating a child container, which would be request specific, in the controller Action. Because I went with the config and bootstrapping generously supplied by the good folks who support MvcSiteMapProvider, I ran into trouble because they have abstracted the DI container to handle several flavors and the container is read-only. Then I stumbled across the Unity.Mvc PerRequestLifetimeManager which superficially sounds like a solution but there's kind of a dearth of information about it. Before I get lost for days down the various rabbit holes, has anyone else been down this path and found a clean, semi-elegant solution?
Forgive my possible lack in understanding of the complexities of your project; but from a simpleton perspective some options for persisting entity audit info (last update datetime, user, etc.):
1. have a base class for your entities, define therein the audit info properties, set them in constructor or expose them to the app to set/override.
2. have a base class for your context, override SaveChanges, examine the entities being persisted and update their audit info (http://msdn.microsoft.com/en-ca/library/vstudio/cc716714(v=vs.100).aspx).
Looks like the PerRequestLifetimeManager is working well. I expected a lot of trouble mixing the MvcSiteMapProvider's bootstrapper and other infrastructure with the Unity.Mvc NuGet package but so far it looks like they are very happy together.

Choice of technical solution to handling and processing data for a Liferay Project

I am researching to start a new project based on Liferay.
It relies on a system that will require its own data model and a certain agility and flexibility in data management as well as its visualization.
These are my options:
Using Liferay Expando fields and define their own data models. I must do all the view layer.
Using Liferay ECMS adding patches creating structures and hooks that allow me to define data models Master - Detail. It makes much easier viewing issue (velocity templates), but perhaps is the most "dirty" way.
Generating data layer and access to services with Hibernate and Spring. (using Service Factory, for example).
Liferay Service Builder would be similar to the option of creating the platform with Hibernate and Spring.
CRUD generation systems as OpenXava or your XMLPortletFactory
And now my question, what is your advice? What advantages or disadvantages do you think would provide one or another option?
Thanks in advance.
I can't speak for the other CRUD generation systems but I can tell you about the Liferay approaches.
I would take a hybrid approach.
First, I would create the required data models as best as I can with the current requirements in Liferay Service Builder and maintain them there as much as possible. This would require that you rebuild and redeploy your plugin every time you changed the data model but would greatly enhance performance compared to all the other Liferay approaches you've mentioned. Service Builder in that regard is much more rigid and cannot be changed via GUI.
However, in the event for some reason you cannot use Service Builder to redefine your data models and you need certain aspects of it the be changed via GUI, you can also use Expandos to extend the models you've created with Service Builder. So, it is the best of both worlds.
On the other option, using the ECMS would be a specialized case and I would only take this approach if there is a particular requirement it satisfies (like integration with the ECMS).
With that said, Liferay provides you many different ways to create your application. It ultimately depends on how you're going to use your application.

Monotouch: Example of an implementation of a finite length task executing when exiting iOS application?

In Apple's docs I have found an article how to execute a finite-length task when exiting the application. I am looking for a way to adopt that in MonoTouch.
The idea is to process some data if the user pushes the app into background, but that processing takes longer than the time I'm granted by default, hence I want to use the functionality describe here: http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphoneosprogrammingguide/BackgroundExecution/BackgroundExecution.html to get more time.
How does the code translate into MT? Has anybody an example?
I have a blog post with an example for MonoTouch: http://software.tavlikos.com/2010/12/08/multitasking-in-ios-the-monotouch-way-part-i/

Jackrabbit Security

I started to use Jackrabbit in my project. As i found out there is no complex LoginModule and AccessManager given. I mean we can find SimpleLoginModule but it is just a mock.
What i need is a simple LoginModule which can be configured eg from a file with users, passwords and groups. I know that i can implement my own classes, but it is hard to believe that after so many years there is no ready solution...
there are a couple Jackrabbit based open source / closed source projects out there that use JCR as their reference implementation and have implementations. Most probably you're best of choosing one of them in order to not reinvent the wheel. For a complete list: http://en.wikipedia.org/wiki/Apache_Jackrabbit
Are you running inside an app server or web container? If so, you would usually expect the container to provide a JAAS implementation. For example, for instructions on how to set it up with Jetty, storing user information in a database, a properties file, or LDAP, see:
http://www.eclipse.org/jetty/documentation/current/jaas-support.html

Resources