Conversation Plugin vs ActionFlow - struts2

Can anyone detail the differences between the Struts2 Conversation plugin and ActionFlow plugin and when I should choose one or the other?
Regards

They are totally different plugins for different purposes. Conversation plugin adds conversation scope to your application. ActionFlow plugin helps you create wizard from actions where holding data in some scope is just one of the features. With ActionFlow you can define sequences of actions (i.e. which action will be executed after the current action). With Conversation you can define which data will be put into conversation scope and when conversation will start and end.
Use ActionFlow plugin when you need to create a wizard.
Use Conversation plugin when you want to add conversation scope to your application.

Related

What is the best way to auto-generate PBIs in TFS?

I am looking for advice.
I have a requirement to generate 5 PBIs under a Feature. We need the user to be able to trigger the process by populating a field for example.
Do I need code for this or is there a codeless method?
I can see that I can build Plugins for TFS. I saw an example or two (although they were related to code check-ins). I would be looking to investigate a trigger around the save of a feature and if a specific thing has occurred generate some child PBIs.
Ideally I would like a codeless method within TFS for this but am happy with investigating a Plugin if necessary.
We are on premise now but may move to online in six months or more.
If you`ll move to online, you have several options and they are not codeless:
Use existing solutions, example: TFS Aggregator
Create a custom web service to listen events and do some actions: Web Hooks
Create a custom application and use it as scheduled task: Automation of state changing for Azure DevOps work items

Bonita BPM Components

I am completely a newbie in Bonita and BPM in general, in my introductory video lessons, I have so far learned about data models, the UI among others. So what I wanted is to know the components, I don't know what they are called but I call them components, I mean contracts, data models, and the likes, what are others that are involved in BPM because I don't even know how to google that.
Any help will be highly appreciated, even a link will be very useful.
Bonita BPM includes three main components:
Studio: the tool to design your processes. Also include an embedded test environment.
UI Designer: a web tool included in the Studio that let you create end user web interfaces.
Portal: the end user web interface to interact with processes. Also used by the administrator to deploy process, configure...
Engine: the technical component responsible for process execution.
You also have several important concepts in Bonita BPM:
Process definition: this is the model of the process with tasks, gateway... You create it using Bonita BPM Studio.
Business Data Model: this is a model of your data that you can create using Bonita BPM Studio. This model will generate a set of Java classes that represents your business data and also associated code to save and retrieve all those data from a database. Data define in this model are shared by all process definitions.
In a process definition you can declare business variables. They are actually reference to the business data store in the database. You can instantiate them using default value of your business variables. You can update them using operations on tasks.
Contract define the data expected by the Engine in order to instantiate a process or execute a task. End user will usually submit a form to start a process or execute a task. Contract define which data is expected from the form submission.
Forms are created using UI Designer. A form is actually a set of widget bind to form variables. The forms variables can be initialized using REST API call or by user input in the widget. REST API call can be done for example to get business variables values or access external system such as a database. Submit button is also associated to a form variable. This form variable must contains all information required by the contract.
Connectors are part of the process definition and let you interact with third party system when the process is executed. For example it can call a web service to decide if a specific path need to be taken or not.
I would recommend to checkout getting started tutorial in the documentation. You can also watch BPM Camp videos.

Associating Data with authenticated user in ASP.NET MVC optimization

I am using ASP.NET WebAPI with the built in authentication and identity services that come with the Visual Studio template. I now have it that a user can access the system and be authenticated.
The next logical step is to allow the user to create records. Lets say the user can have a "Project". How can I associate the user with a project at the point the project is created? It seems logical that the project table will just store the user_id provided by User.Identity.GetUserId().
Now, say that a project consists of Tasks. By default the WebAPI will create a Tasks controller, where I post a task. I think I would need to inject some additional information (such as the project id) at the point of creating the task.
But, say someone wants to add a task a project that doesn't belong to them. I need to verify this by loading the project, and checking the user_id field. Now I am adding two repositories to my controller. This seems like a lot of work.
Is it my own laziness that makes this seem hard???
I think this might be a related question, as it seems like you are looking for record-level authorization.
MVC / ASP.Net Best Practice for Record-Level Authorization
There is merit also in using multiple repositories. See here for an example of use.
http://www.asp.net/mvc/overview/older-versions/getting-started-with-ef-5-using-mvc-4/implementing-the-repository-and-unit-of-work-patterns-in-an-asp-net-mvc-application
Here, you would wrap the multiple repositories up within the UnitOfWork class.
I hope this points you in the right direction.

FHIR: Adding validation for my extensions to a resource in Spark

How can I add validation for my extensions to a resource in Spark? Typical use case: I have a look up table of values against which the extension value need to be checked against.
I assume validating each extension in a Other resource is suffice or is there hooks in spark to validate 'Other' resource?
There are multiple types of validation, some of which are currently present in the .NET library. Most of these are around validating the instances against the generic "core" definitions in the specifications of the resources, so these will not be able to validate your specific "look up tables". You can read more about these validations right here: http://ewoutkramer.github.io/fhir-net-api/validation.html
What you want to do is introduce your own "look up tables", which we call "ValueSets" in FHIR. What you'd need to do is create your own valueset, and combine this with a "profile". David Hay has written about this here: http://fhirblog.com/2014/03/11/profiles-and-valuesets-in-fhir/
Now, once you have done this, you need the .NET library to validate your instance against the profile. This is work in progress but we expect to add this functionality to the next version of the .NET NuGet package, which will arrive somewhere late august or early september.

Extending Spring Security UI plugin (and plugins in general)

The Spring Security UI plugin, among other things, provides a registration page. On this page are 4 fields: username, email, password, and verify-password. It uses a regular architecture of controller and gsps. Staying with a single page registration for the user, I need to add a bunch of fields -- e.g. address, payment info, etc.
Any thoughts / recommendations on how to extend this plugin's page, so that I can get updated versions and incorporate them without too much re-integration. It's almost like one part of the page should go to the UI controller, and the other parts of the page should go to my controller. Note the UI controller usees regular forms (i.e. not ajax).
Thanks
To custom configure the Spring Security UI plugin I'd first of all have a look at the existing plugin code to get a handle on how it works and then run the override scripts that you require as detailed at:
http://burtbeckwith.github.com/grails-spring-security-ui/docs/manual/guide/10%20Customization.html
In your case you'd need:
grails s2ui-override register com.my.packagename
Jim.
Assuming you used the s2-quickstart script to create the domain classes, controllers, and GSPs, you have 2 options for customising the User domain class
add your custom properties (address, payment info, etc.) directly to the User domain class created by the plugin
create your own User domain class that extends the one generated by the plugin. Add your custom properties to the subclass
According to this article, the latter approach is preferable because:
because it allows you to easily update the generated user domain class
if its template ever changes. It also means you don't overly pollute
your domain model with Spring Security specifics. On the downside, you
have to deal with domain class inheritance, although the cost is
pretty minimal.
You'll also need to add the custom fields to the GSPs. The controller actions probably won't require any modifications.

Resources