[daisy] set document variable in workflow

Victor Oomens victor at oomens-ict.nl
Wed May 23 04:30:12 CDT 2007


Thanks, very helpful, and it works like a charm! There's also a public
repository variable in javascript which seems to work as well. What is the
difference between repository and wfRepository? And how can I update the
document version attachted to the workflow (daisy_document)? The version has
been changed by saving the document with a new variable value. So I would
like this new document version to be attached to the workflow.

-----Oorspronkelijk bericht-----
Van: daisy-bounces at lists.cocoondev.org
[mailto:daisy-bounces at lists.cocoondev.org] Namens Bruno Dumon
Verzonden: vrijdag 4 mei 2007 15:26
Aan: Daisy: open source CMS - general mailinglist
Onderwerp: Re: [daisy] set document variable in workflow

Hi,

On Fri, 2007-05-04 at 14:27 +0200, Victor Oomens wrote:
> Hi,
> 
>  
> 
> I would like to set a document variable using document.setField() in a
> workflow task. How can I do this?
> 
>  

There's documentation and samples, could you maybe be a bit more
specific on where you get stuck?

You didn't mention which document you want to modify, so just some
random hints:

* the default document associated with a process is stored in the
daisy_document global variable [1]

* if you write the task in javascript, see [2] for how to get access to
variables, the repository, etc.

* this what you'll find in the timedpublish sample:

var docVersionKey = variables.getGlobalVariable("daisy_document");
var document = wfRepository.getDocument(docVersionKey.getVariantKey(),
true);


[1]
http://cocoondev.org/daisydocs-2_1/g1/g1/365-cd.html#dsy365-cd_daisy_documen
t_var
[2] http://cocoondev.org/daisydocs-2_1/g1/g1/364-cd.html

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org                          bruno at apache.org

_______________________________________________
daisy community mailing list
Professional Daisy support:
http://outerthought.org/site/services/daisy/daisysupport.html
mail to: daisy at lists.cocoondev.org
list information: http://lists.cocoondev.org/mailman/listinfo/daisy



More information about the daisy mailing list