Expand my Community achievements bar.

Upload file in workspace

Avatar

Level 4

Dear all,

What I am trying to do is upload a file, and by the file content trigger multi-workflow to difference users.

I have a stupid workaround by using a attachment, but I would like to know what's the right path to do so.

Thanks in advance.

Regards

Bill

14 Replies

Avatar

Level 10

Do you have to use workspace?

You can just use a watch folder and drop the file in there?

Can you elaborate more on your use case?

Jasmin

Avatar

Level 4

Hi Jasmin,

Thanks for the reply.

Try to do it with upload only because it is more easy to use and remember.

e.g.     With the upload method, users can login to workspace and choice the correct workflow to run, and all the required information can find inside.

          With watched folder, users should remember where the instruction located, or should remember the instruction itself.

Understand that it may not be something that can be done with ALC, just want to confirm before switching to any workaround (Attachment or Watched Folder)

Regards

Bill

Avatar

Level 10

I'm still not clear on your use case.

Before you try a workaround, can you just try to explain it again and I can suggest the best approach.

Jasmin

Avatar

Level 4

Hi Jasmin,

Thanks for offering the help.

What I want to do is submit a file and trigger batch of workflow to difference user.

(A notification with both form and email)

WatchedFolder is not used because user tend to forgot the path and other information like the required file format and will call support team

Copy the require content to text field in the form is not used because the content can be large, and user will copy only part of the content sometimes and lead to call to support team.

So, I come up the solution to include all the instruction in the process form, and upload the file.

Wish it is clear now.

Regards

Bill

Avatar

Level 10

Submitting the file is not a problem. You can use different ways to submit your form (Workspace, web service, REST, API, etc).

Once the form is submitted to LiveCycle, you can extract the data and then send the form to the appropriate person.

Is there something you're not sure in doing that?

Jasmin

Avatar

Level 4

Hi Jasmin,

Good to hear that there are so many choice, but I have no idea which function to call.

Already do a few search on the web with no luck, guess I am using the wrong keywords.

May I have one pointer or two please? (With workspace and web service may be?)

Regards

Bill

Avatar

Level 4

Hi Jasmin,

Thanks for the reference, I think my problem is not how to call the web service, but how to get this data send to the server first.

If I can get the data into the form and send to server, I think I have the skill to call the web service.

But my problem is, how to get the data from the file in local file system, and send it to the server via the form.

Wish it is clear now.

Regards

Bill

Avatar

Level 10

But that's related.

If you send the data to the server, you'll most likely send the data to a LiveCycle process. The process can only be invoked using the different startpoints we provide.

Now, from a form, the two ways you want to communicate with the server is via web service or REST.

If you add a button on your form and change the type to Execute, it will allow you to invoke a web service.

If you add a button on your form and change the type to submit, it will allow you to invoke a url and make use of the REST interface.

If you're planning in sending all the data for the form I suggest you use REST. You can get the REST url from the Start Points properties from within Workbench.

I think we're starting to get somewhere .


Jasmin

Avatar

Level 4

Hi Jasmin,

I just do some research on using web service to upload file, and I find some examples.

And I find that it is somewhat the same as what I think, while using web server to upload file:

1) First the interface program get the file name

2) The interface program load the file data into variable

3) The interface program pass the file name and file data to the web service

4) The web service write the file to service side with the file name and data provide

I think my question is how can I do point 2 with form in workspace as the interface problem.

And point 1 with a windows like file open dialog if possible.

For REST I didn't use it before and not really sure, but it look like another kind of Web Service access method too me, so it will have the same step as above I assume.

Regards

Bill

Avatar

Level 10

Hi,

My advise is to create a smiple flex application for the User Interface. The flex applciation can show the

File Open dialog on click of a button. The ActionScript has methods to process the files. For e.g adding attachments to the process etc.

Do you think this will workout?

Or why don't you prefer the in-built attachments adding feature?. Any issue in using that?

Nith

Avatar

Level 10

I think the question is, what interface program are you planning to use?

If you use our the Workspace, then you can just use the built-in attachment tabs to submit files to LiveCycle.

If you build  your own interface it's up to you to code it.

Avatar

Level 4

Hi Nith,

Thanks for the suggestion, but I am trying to implement the function with workspace, so I think this will not be a option.

For the attachment workaround, as I said in older reply, I will go for that if I find no others solution.

The attachment will work for now, but I just want to know if I can create upload function with workspace because it have more control.

e.g.

- Avoid user to upload more then 1 file while we only require 1

- If we require 3 difference files, I can provide 3 difference upload button for them, so I don't need to use some specific method to indicate which file for which purpose. (e.g. Force the naming)

Regards

Bill

Avatar

Level 4

Hi Jasmin,

I am trying to use workspace to upload.

As I said in last post, I will go for the attachment workaround if no other solution, I just want to explore the possibility to create a upload function in workspace.

Maybe I ask the question in another way, while I open a form in the workspace, how can I read a file from local(user) file system, and pass the content to a web service?

Thanks in advance

Regards

Bill