cancel
Showing results for 
Search instead for 
Did you mean: 

Create eFile inside workflow

mrjay
Champ in-the-making
Champ in-the-making
Hi everybody,

is it possible to create eFile inside workflow. Whant i want to do is to create eFile in first step of my workflow and then put some kind of reference to make it easy availble in other steps. If it's possible can you please clarify how to do it.

Thanks in advance,
Joso
7 REPLIES 7

scouil
Star Contributor
Star Contributor
Hi,

It will require a custom workflow.
In the workflow, you can write listeners that allow you to run custom code. In this code you can create your file where you want in Alfresco.
Then I suggest adding it to the packageItems for easy access to it in the next steps of your workflow.

mrjay
Champ in-the-making
Champ in-the-making

thanks for reply. I thought it is something like that. Let me know if i'm thinking right. Idea is to edit workflow (.bpmn file) by creating taskListener and in listeners's "complete" event write some custom code to save my eFile.

Thanks,
Joso

scouil
Star Contributor
Star Contributor
Hi,

Yes exactly. The custom code will have to:
- create the file,
- get its nodeRef
- add it to the current workflow's packageitems

I did a similar customisation for my previous company some time ago. But the code stayed there so I'm unable to share.
However it definitely is possible.
Good luck.

mrjay
Champ in-the-making
Champ in-the-making
ok, i'll try it

Thanks,
Joso

mrjay
Champ in-the-making
Champ in-the-making
it seems that you can't put folder (space) in workflow package by default. Can you explain how to achieve that?

Thanks,
Joso

scouil
Star Contributor
Star Contributor
Hi,

Yes by default the packageItem is a specialized picker for the type cm:content.
You can see it in packageitems.ftl:
itemType: "cm:content",

So if you need a folder in there you'd need to extend that component with your custom one where you change that parameter.

But why do you want to add a folder and not just the file you created?

mrjay
Champ in-the-making
Champ in-the-making
I misunderstood some things while researching so just ignore the post above.