External form rendering using formKey in wso2 BPMN - wso2

I want to render external form as part of my user task in wso2 BPMN. However, I ma not sure whether I am using the formKey properly. I configured the user task as follows and it was not rendering the form
**<userTask id="usertask1" name="User Task" activiti:assignee="admin" activiti:formKey="conf/user.html"></userTask>**
Hence, I have the following queries
Should formKey be a simple file path or it should be a key?
If it should be a key, how to generate the key? Should the form be registered to obtain the key? (If so, how?)
Main Config image for User Task in WSO2

You are using the form key correctly, however, be aware the form key is nothing more metadata. You will need to create a client application that understands what to do with the form key.
The Activiti 6 Tasklist application is a perfect example of how an application makes use of the form key.
I also wrote a simple example for Activiti 5.14 that may help here, it uses Alpaca form renderer and form keys but the ReST APi I used was removed in 5.16 so I halted development: https://github.com/gdharley/activiti-alpaca

Related

Deploy both .html embedded form and .bpmn model using rest API

according this article its possible to deploy both bpmn model and its embedded form with camunda API requests. the problem is that I dont want to use curl tools. I need to deploy both .bpmn model and .html form files with statndard camunda API post method .
I’ve ever do this to deploy my .bpmn model with generated forms type. but righ now I want to deploy embedded forms (as a seperate .html file). now, how can i upload both of these files with rest API?
( I know that i should use ‘embedded:deployment:sampleEmbeddedForm.html’ in modeler form key)
In addition, I use postman to test these rest APIs.
I would be very grateful if you could help me.
according to help of a friend that the answer is posted here, its possible by adding a new body parameter, as name as form name.

django_auth_ldap vs postgres db using django models

I am creating an app where I store the USERS in a Postgres database with the help of the standard User Model, in my Django app i use Django queries to get all needed information, like "first_name", "username" .. etc
I implemented Django_auth_ldap to start storing user identification data in an Openldap server if i want. But now, i'm confused to how to get the data i used to get using django queries. i don't want to change the behavior in my views, i want to continue using Django queries
This looks like it describes some of what you want: https://django-auth-ldap.readthedocs.io/en/latest/users.html
You can perform arbitrary population of your user models by adding listeners to the Django signal: django_auth_ldap.backend.populate_user. This signal is sent after the user object has been constructed (but not necessarily saved) and any configured attribute mapping has been applied (see below). You can use this to propagate information from the LDAP directory to the user object any way you like. If you need the user object to exist in the database at this point, you can save it in your signal handler or override get_or_build_user(). In either case, the user instance will be saved automatically after the signal handlers are run.

How can I populate a field of a form calling a web server with a parameter in Orbeon?

I need to populate some fields depending on the selection of a dynamic dropdown.
Those fields need to use a WS to get the value using the selection as parameter.
I'm working with CE.
I assume this question is in the context of a form you've created with Form Builder:
With Orbeon Forms PE, you can do this with the Form Builder UI by creating an HTTP Service corresponding to your Web Service, and creating an action that calls the service upon the value of your dynamic dropdown changing.
With Orbeon Forms CE, you can't use the Form Builder UI, as services and actions are only supported in the PE, and would need to resort to writing your own XForms code that does this.

Managing UserContext in Django

Im using the following statement to set Language Option in my projects which works as expected.
request.session['django_language'] = "de"
This is fine with in View, but when the control goes to other files to connect to DB or external services how can I access it. I dont want to pass the request object through out all the application.
If something like UserContext/RequestContext where every request has to go-through it (Middleware) so that I can set it there and access it without help if request object.
I understand from the headline that you want to store the language per user.
It might be best to extend the user model and add a model field for preferred_language.

How do I set session variables at login using django-registration and auth?

I'm using django-registration to log users into my application. That part works fine. The part that I cannot figure out is how to set custom session variables when the user logs in. For instance, I'd like to populate variables containing UserProfile data as well as the output of a few other functions. Then I'd be able to use that information in subsequent views/templates.
If anybody can point me to a tutorial online or post some sample code, that would be great.
I'm using django 1.1 and Python 2.6
If you don't want persistent storage of user data (just additional session data) have a look at:
http://docs.djangoproject.com/en/dev/topics/http/sessions/
The sessions framework will most probably be already enabled if you use django.contrib.auth.
If you want persistent storage of additional user data (not only in a session, but in the database), you will store them in another "profile" model:
http://docs.djangoproject.com/en/dev/topics/auth/#storing-additional-information-about-users
I realize #stefanw provided you an alternative solution, but to answer the original question:
Setting session data at login is difficult because the easiest place to set that data is in your view function, and the particular view function you'd want to modify is a part of the contrib.django.auth app.
So your options would be the following:
Create a small middleware class to set your session data.
Create a template tag or other bit of code than can be integrated into the login template or subsequent page that will set the data you want.
Write your own custom login view function (it's really quite easy, actually).
Happy django-ing!