Is it possible to modify dimensions of revit model through design automation api? if yes how? - forge

currently im trying to modify my model from viewer with help of design automation api, it is possible to get properties of revit file but how to modify those properties and view back to the viewer

Yes of course - possible workflow would be:
Create a plugin to modify your model - see this code sample here
Bundle your plugin to upload to Forge and define an activity for execution - see tutorial here
Load the model into Viewer after translating it with Model Derivative
Collect the data/parameter from user input and/or model properties/metadata
Call a workitem with the parameters and execute the plugin, can upload the modified output as versioned items to track changes
Use webhooks to get notified of new version being added and trigger a translation of it, or you can upload the output to your own app and trigger upload and translation with your own workflow
Load the modified model back into Viewer
See here for our official tutorial on Design Automation.

Related

Form Recognizer - model for each environment?

On our test environment we created custom Form Recognizer model. Is there a way to reuse this model on PROD environment? Prod environment is under different subscription.
I cannot find a way to somehow "export" model and move it to other environment. Do I need to create new model from scratch?
You can use the Copy Model API to copy a model between regions and subscriptions. See here for more details -
How to Copy API - https://learn.microsoft.com/en-us/azure/cognitive-services/form-recognizer/disaster-recovery#copy-api-overview
Copy Model API reference - https://westcentralus.dev.cognitive.microsoft.com/docs/services/form-recognizer-api-v2-1-preview-2/operations/CopyCustomFormModel

Publish to Alfresco task programmatically

I am using Activiti 1.9.03 and Alfresco 5.2.4 enterprise versions. I have a requirement where I have to maintain the version of the generated report document and also uploaded document (if user edits it). Right now After each user tasks, I am adding two Publish to Alfresco tasks. This is making the workflow diagram unreadable.
I want to know the following things.
Is there any other way to handle versioning in Activiti instead of pushing the content to the Alfresco?
How can I upload the content programatically using JAVA or Javascript task in a listener, so that I don't have to keep the Publish to Alfresco tasks in the workflow definition. OR
Is there any way to hide the Publish to Alfresco tasks on the workflow diagram?
Any help will be appreciated...
Thank you
In APS,There are Services like AlfrescoService,AlfrescoContentService.
You can autowire those services in your Listner and you can use REST Call.

Custom Report in alfresco?

Currently i am generating a report (we are getting files are uploaded within a time stamp).
I am getting all files and folders.Iterating the result and checking created date one by one.That is taking too much time approx 8 min to revert with resuls.Can anyone tell me is there any alfresco report api that i can use? or using solr how to fetch the result?
I like to follow an approach which is maybe not really orthodox. Usually, you don't want to report on all documents, only document using a specific type or aspect. So, what I do is to create a Java behaviour on onCreate, onUpdate and onDelete that updates a custom database with only the metadata that I'm interested in. Then, I can connect any OOTB reporting tools such as Pentaho, Jasper or Tableau. You have of couse some other traditional alternatives, such as:
Using this module developed by a community member: http://fcorti.com/alfresco-audit-analysis-reporting/
Or using the module provided by Alfresco: http://docs.alfresco.com/analytics/concepts/analytics-using.html
SOLR/Lucene is not an option, querying DB directly is not an option either (performance wise).
I would suggest using one of the options available (AAAR for instance) or developing something on your own following the same principles.
I did little bit investigation on this and found below link.
http://docs.alfresco.com/4.0/tasks/audit-recording-values.html
I think you can user auditService in alfresco and get your things done.There are few alfresco webservices(related to audit) already available which will allow you to filter response.In case if you need to customize it , than you can create webscript and use auditService in it.
You can use below url for browsing all your alfresco webservice.
http://localhost:8080/alfresco/service/index

Alfresco share UI form for custom model

I'm using Alfresco one 5.1 Enterprise edition. I've created a custom content model using the Model Manager in Alfresco & it has some custom properties (ds:prority, ds:action, ds:actionText, ds:linkURL, etc) associated with it. I would like to customize Share UI to include these custom properties alongside the default cm:content properties (cm:content, cm:description, cm:title, etc). I'm referring to Jeff Potts post on ecmarchitect to use custom model & share UI customization.
Now my question is, can I use the model created in Alfresco Model Manager & create a customized Share form along with these custom properties. All the examples for this process I see content model definition done in a Alfresco repo AMP and then have the Share form customization done in an Alfresco share amp. Can I create the share AMP alone (for my Share UI Customization) & still refer the model which I've already created in Alfresco Model Manager ?
You can use model console to list out created & deployed models.
http://IP:Port/alfresco/s/enterprise/admin/admin-repoconsole
Command : show models
If you're able to see your model with loaded (isLoaded) status as "Yes" then you can deploy on the share amp should be fine.
Have you created this model in your development machine or production machine?
If it is development machine, you need the Repo amp to deploy the model in the production machine.
##
## Model Admin Commands
##
ok> show models
Show deployed models - that are stored in the repository data dictionary.
ok> deploy model
Upload model to repository and load into runtime data dictionary. This will also
set the repository model as active.
If a model is already deployed then it will be updated and re-deployed.
e.g. deploy model alfresco/extension/exampleModel.xml
ok> undeploy model
Permanently delete model from repository (all versions) and unload from runtime data dictionary.
e.g. undeploy model exampleModel.xml
ok> activate model
Set repository model to active and load into runtime data dictionary.
e.g. activate model exampleModel.xml
ok> deactivate model
Set repository model to inactive and unload from runtime data dictionary.
e.g. deactivate model exampleModel.xml
As you're using Enterpise edition, you can get in touch with Alfresco support also.
Hope this helps you.
As pointed out by Murali, once the model is active, we can create a Share AMP as pointed out in Jeff Potts tutorial, create a share amp archive using maven target (mvn package) and deploy the same to alfresco amps_share folder (/alfresco_one/amps_share) and then apply the same with the apply_amps.sh command in /bin/apply_amps.sh and then restart alfresco.
Note for my requirement I needed the custom properties to be part of inline-edit screen of share only. So I added the
<config evaluator="node-type" condition="<my model>">
...
<form id="doclib-inline-edit">
...
<show id="my:property" force="true" />
...
...
</config>
Initially I had cm:content in the condition evaluator & it didn't work. Only after updating it to my model name it started reflecting the changes.
Note: without restarting Alfresco the changes are not reflecting.

How do I make new/edits to nodes pass through intermediary for acceptance first?

I would like my users to be able to create and edit their own content. However, after they create new content, and after they edit it, I would like to have a way to accept those changes. Meanwhile, before changes are accepted, the previous version of the node will remain visible. Can this be accomplished with workbench, or is there another route I should take?
You can make the node content type unpublished by default from [admin/structure/types/manage/article] where "article" is the node content type...and then you can use "views" module to display all un published node... then you can manage the unpublished nodes and make theme published...
then
you can use rules module to make the node unpublish after its edited by the user
Take a look at the Maestro module. It is a way to implement workflows into your site.
From the project page:
The Maestro module is a workflow engine/solution that will facilitate
simple and complex business process automation. The first release of
this module will be for Drupal v7.
Maestro has a number of components that include the workflow engine
and the visual workflow editor. The workflow editor is used to define
the workflow, creating a workflow template. The workflow engine runs
in the backgound and executes the workflow tasks, testing the tasks
execution results and branch the workflow if required. The workflow
engine will run every x seconds and execute all tasks that are in the
queue which have not yet completed. Once they execute and return a
success status, the engine will archive them and step the workflow
forward. Both these components have been developed to support any
number of different task types. New task types can be developed and
added much like the Drupal CCK module can support new field types.
I have installed and configure the "Maestro" Module in Drupal Commons.
actually in Maestro Module every time we should Load the Workflow and it will go through step by step.
Like
Admin: Publishing Workflow Load
User1: Assigend to add new Content.
User2: Review Content
User3: Publish Content.
Here I want to Skip the Admin Step Is it possible? When user create new content type it is automatically go for review.

Resources