Hi Thomas,
Thanks for that. Maybe a very silly question but how do I get a job to run in a specific Wiki?
Br,
Peter
Van: Thomas Mortagne <thomas.mortagne(a)xwiki.com <mailto:thomas.mortagne@xwiki.com>>
Onderwerp: Antw.: [xwiki-users] Question on Jobs and context
Datum: 13 november 2015 14:52:51 CET
Aan: XWiki Users <users(a)xwiki.org <mailto:users@xwiki.org>>
Antwoord aan: XWiki Users <users(a)xwiki.org <mailto:users@xwiki.org>>
Right now there is no standard for it. Usually jobs that need to run
in a specific wiki or with specific user for example are provided with
this wiki/user as a job request parameter.
On Fri, Nov 13, 2015 at 2:51 PM, Peter Huisman <p.huisman(a)ximm.nl <mailto:p.huisman@ximm.nl>> wrote:
> Hi,
>
> Im getting my head around job building. One question I have: If I start a job, the context of the job is not the context I need. The script I run is in a subWiki but the context of the job is in the main Wiki. What is the best way to change the context in the job to match the wiki that I am using to start the job?
>
> With kind regards,
>
> Peter
> _______________________________________________
> users mailing list
> users(a)xwiki.org <mailto:users@xwiki.org>
> http://lists.xwiki.org/mailman/listinfo/users <http://lists.xwiki.org/mailman/listinfo/users>
--
Thomas Mortagne
Hi,
Im getting my head around job building. One question I have: If I start a job, the context of the job is not the context I need. The script I run is in a subWiki but the context of the job is in the main Wiki. What is the best way to change the context in the job to match the wiki that I am using to start the job?
With kind regards,
Peter
The XWiki development team is proud to announce the availability of XWiki
7.3.
This is a stabilisation release focusing on the Nested Pages feature which
was introduced in XWiki 7.2.
Lots of polishing has been done for the Nested Pages feature integration,
targeting the consequences on the UI redesign and the changes at
applications level. The release includes a couple of bug fixes, a few
dependency upgrades and new UI extension points available for extension
developers.
You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download
Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73
The following people have contributed code to this release:
Clemens Robbenhaar
Ecaterina Moraru (Valica)
Eduard Moraru
Gabriela Smeria
Guillaume Delhumeau
Jean SIMARD
Manuel Smeria
Marius Dumitru Florea
Pascal Bastien
Sergiu Dumitriu
Thomas Mortagne
Vincent Massol
Thanks for your support
-The XWiki dev team
--- En date de : Ven 6.11.15, Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr> a écrit :
> De: Pascal BASTIEN <pbasnews-xwiki(a)yahoo.fr>
> Objet: [xwiki-users] (About XWIKI-12570:Access right doesn't work well with subgroups) Try to remove some version from document with groovy
> À: "XWiki Users" <users(a)xwiki.org>
> Date: Vendredi 6 novembre 2015, 16h19
> Hi,
>
> I try without success to remove some version from document
> with groovy :-(
>
> To refresh group cache I add & remove a member in a user
> group but I don't want my group be poluted by this
> operation.
>
Here correct code with Thomas help :-)
{{groovy}}
// My group to update
def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3')
print("Current Version : " + MyGroup.getVersion()+ " \n")
// My temp user
udoc = xwiki.getDocument('XWiki.xwikilecteur')
// Add this temp user
gObj = MyGroup.newObject('XWiki.XWikiGroups')
gObj.set('member',udoc.fullName)
MyGroup.save()
// Remove this temp user
MyGroup.removeObject(gObj)
MyGroup.save()
// get document Archive
def gArch = MyGroup.getDocumentArchive()
print("Prev version: " + gArch.getPrevVersion(gArch.getLatestVersion()) + " \n")
print("Last version: " + gArch.getLatestVersion() + " \n")
//remove 2 previous version archive
//gArch.removeVersions(gArch.getLatestVersion(), gArch.getPrevVersion(gArch.getLatestVersion()), xcontext.context)
// must remove 3 version because last saved add one version
gArch.removeVersions(gArch.getLatestVersion(), gArch.getPrevVersion(gArch.getPrevVersion(gArch.getLatestVersion())), xcontext.context)
MyGroup.save()
print("Current Version : " + MyGroup.getVersion()+ " \n")
{{/groovy}}
The XWiki development team is proud to announce the availability of XWiki
7.3 Release Candidate 1. This release candidate includes a couple of bug
fixes and a few dependency upgrades, as well as some improvements related
to Nested Pages. The extension developers should check the new UI extension
points available for the top menu.
You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download
Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki73RC1
The following people have contributed code to this release:
Clemens Robbenhaar
Ecaterina Moraru (Valica)
Eduard Moraru
Guillaume Delhumeau
Marius Dumitru Florea
Thomas Mortagne
Vincent Massol
Thanks for your support
-The XWiki dev team
Hi,
I don't know where to put question about specific extension.
I would like to ask for suggesting some functionality to PlantUML Macro
extension.
http://extensions.xwiki.org/xwiki/bin/view/Extension/PlantUML+Macro
I would like to have option to parameterize type of ouput of PlantUML, e.g.
image or svg and with option to set the default output type.
Is it possible to add this? I know that not all types of diagrams support
svg, but for that case I would use explicit type.
Thank you
Best regards,
Miroslav Galajda
The XWiki development team is proud to announce the availability of XWiki
6.4.6.
This is mainly a stabilization release that fixes important bugs discovered
in the 6.4.5 and earlier versions.
You can download it here: http://www.xwiki.org/xwiki/bin/view/Main/Download
Make sure to review the release notes:
http://www.xwiki.org/xwiki/bin/view/ReleaseNotes/ReleaseNotesXWiki646
The following people have contributed code to this release:
Clemens Robbenhaar
Denis Gervalle
Ecaterina Moraru (Valica)
Eduard Moraru
Guillaume Delhumeau
Marius Dumitru Florea
Thomas Mortagne
Vincent Massol
Thanks for your support
-The XWiki dev team
Hi,
I try without success to remove some version from document with groovy :-(
To refresh group cache I add & remove a member in a user group but I don't want my group be poluted by this operation.
I want to launch this groovy script but unfortunaly this one crash with
gArch.removeVersions("EndVersionToDel", "StartVersionToDel", context)
I use
http://maven.xwiki.org/site/docs/xwiki-javadoc-4.1.x/com/xpn/xwiki/doc/XWik…
but I obtain this error:
Caused by: javax.script.ScriptException: javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: com.xpn.xwiki.doc.XWikiDocumentArchive.removeVersions() is applicable for argument types: (java.lang.String, java.lang.String, javax.script.SimpleScriptContext) values: [EndVersionToDel, StartVersionToDel, javax.script.SimpleScriptContext@4ee56e53]
Possible solutions: removeVersions(org.suigeneris.jrcs.rcs.Version, org.suigeneris.jrcs.rcs.Version, com.xpn.xwiki.XWikiContext)
If someone can help me?
NB: groovy is complicated for me (and I don't understand what is context and how to get it)
Thxs
Pascal B
{{groovy}}
// My group to refresh
def MyGroup = xwiki.getDocument('XWiki.GF_PiloteP3')
// My temp user
udoc = xwiki.getDocument('XWiki.xwikilecteur')
// Add this temp user
gObj = MyGroup.newObject('XWiki.XWikiGroups')
gObj.set('member',udoc.fullName)
MyGroup.save()
// Store version to delete
def StartVersionToDel = MyGroup.getVersion()
print(MyGroup.getVersion() + "' \n")
// Remove this temp user
MyGroup.removeObject(gObj)
MyGroup.save()
// Store new version to delete
def EndVersionToDel = MyGroup.getVersion()
print(MyGroup.getVersion() + " \n")
// get document Archive
def gArch = MyGroup.getDocumentArchive()
//try to remove 2 previous version archive
gArch.removeVersions("EndVersionToDel", "StartVersionToDel", context)
print(MyGroup.getVersion()+ " \n context: " + context + " \n")
{{/groovy}}