cancel
Showing results for 
Search instead for 
Did you mean: 

Flex calling alfresco workflow

pamela
Champ in-the-making
Champ in-the-making
Hi!

I'm trying to make my workflow in alfresco work in my Flex application. I'm thinking if only i can trigger a Flex component, lets say a button, start a workflow deployed in alfresco.
I don't know where to start… please help… Smiley Sad

Hope anyone could answer..

Pam
9 REPLIES 9

stevereiner
Champ in-the-making
Champ in-the-making
FlexSpaces has a start workflow flex dialog which may help you. You can use various levels of this:
1. dialog: StartWorkflowView + StartWorkflowPresModel presentation model  (presentation model in "latest source" download)
2. different view + StartWorkflowPresModel
3. send event: StartWorkflowEvent
4. webscript: integratedsemantics/tasks/startWorkflow.post.desc.xml etc.

http://forge.alfresco.com/projects/flexspaces/
http://forums.alfresco.com/en/viewtopic.php?f=32&t=14382

Steve

pamela
Champ in-the-making
Champ in-the-making
Thank you Steve, I'll try to do that.  Smiley Very Happy

macycrazy
Champ in-the-making
Champ in-the-making
Hi Steve!

  Same question with pamela, but i just want to give emphasis that we have two separate applications: a Front-end (flex-made) and a Back-end process(workflows) in Alfresco. We didn't just customized the UI of Alfresco using Flex (we created another UI application). The question is, how can a flex component(for example: a Request Membership form) call a customized workflow from alfresco? And reflect the Task/to-do and notification email link at the front-end?

stevereiner
Champ in-the-making
Champ in-the-making
Although the startworkflow dialog in FlexSpaces currently only lists adhoc, and review as the workflow types, the StartWorkflowEvent / webscript can take the name/type of any workflow, assignTo, description, and due date.  If you need to pass more parms you could modify/extend the flex/actionscript event  and the webscript.

FlexSpaces has components for user tasks/todo:
TasksPanelView +TasksPanelPresModel  (task list, attachments list, task control)
TaskListView + TaskListPresModel

Currently don't have a notification list component

forum for more flexspaces questions
http://forge.alfresco.com/forum/?group_id=149

macycrazy
Champ in-the-making
Champ in-the-making
Flex application(UI/Front end )<———–>workflow?<————>Alfresco (content management)

A form called Request Membership form is to be fill up by a user (initiator of the workflow) in our Flex application, when he presses REQUEST button, what I want to happen is that the REQUEST_MEMBERSHIP workflow (customized) will be called from Alfresco and start the process. How can I make the My Tasks To DO (of the initiator and approver) appear in my Flex application(Front-end)?

Any help? We're trying something really hard here. From what I understand, the FlexSpaces made use of the Alfresco UI and configured it using Adobe Flex Builder. But our application is somewhat different. We created a separate Flex UI application (to utilize the Flex animation) which is independent of Alfresco. We are trying to connect the two applications now (…and end up hard-coding most of the connections). Thus our problem arises.

stevereiner
Champ in-the-making
Champ in-the-making
FlexSpaces is a custom flex application with flex components (including user tasks todo list) that you can use in your flex app.
It communicates via REST with custom webscripts that you install in alfresco (these return xml data).

not true: "FlexSpaces made use of the Alfresco UI and configured it using Adobe Flex Builder" 
(Although in air version there is an optional tab running share for the additional collab features. I am working on flex versions of the collab features in another project FlexibleShare)

latest source http://forge.alfresco.com/frs/download.php/550/FlexSpacesSource.zip
0.8 built version http://forge.alfresco.com/frs/download.php/533/flexspaces-browser.zip  (also has readmes and webscripts needed for use with latest source)(also air versions with additional desktop drag features)

http://forge.alfresco.com/projects/flexspaces/
http://forums.alfresco.com/en/viewtopic.php?f=32&t=14382
forum for more flexspaces questions
http://forge.alfresco.com/forum/?group_id=149

jimrobson
Champ in-the-making
Champ in-the-making
@macycrazy,

If you are building a custom Flex/Alfresco application, then you can write a simple ReST API for your Alfresco functionality and access it from Flex using regular HTTPService instances. You can also leverage the Alfresco Flex SDK for this kind of application. You can get the Alfresco Flex SDK along with a very simple demo application here: http://www.robsondesign.com/blog/index.php/2008/08/27/flex-alfresco-webinar-code/.

Let us know how it goes - and good luck!

- Jim

pamela
Champ in-the-making
Champ in-the-making
@macycrazy,

If you are building a custom Flex/Alfresco application, then you can write a simple ReST API for your Alfresco functionality and access it from Flex using regular HTTPService instances. You can also leverage the Alfresco Flex SDK for this kind of application. You can get the Alfresco Flex SDK along with a very simple demo application here: http://www.robsondesign.com/blog/index.php/2008/08/27/flex-alfresco-webinar-code/.

Let us know how it goes - and good luck!

- Jim


i've seen your other posts about using java to start your workflow, it was creating a new advanced workflow using java http://forums.alfresco.com/en/viewtopic.php?f=34&t=9684, my question is, what if i already have a defined workflow and i just want to start it automatically (everything defined, including the receipient and other fields when you manually start an advanced workflow via alfresco web client) using java? let's say, i'll use adhoc, how can i start the adhoc inside my java code?

(we figured out how to upload files from flex to java then to alfresco already  *modifying the alfresco SDK firstwebclient*, so we're assuming that we can start a workflow too, using java, we just don't know how and where to start) please help… if there ever was a tutorial or some articles that you think could help us please point us there… :cry:

pamela
Champ in-the-making
Champ in-the-making
hi jim! finally we were able to call the workflow from flex, we used httpservice to access the direct url of the webscript that handles the workflow inside alfresco.