You are viewing limited content. For full access, please sign in.

Question

Question

Link between WF DB. dbo.user_param and user name or ID

asked on November 9, 2015

Hi,

I am trying to automate the creation of users by using the SDK.
Each LF user has a default folder set in Workflow. Normally we go to the WF designer, tools,
Configure Trustee directories and set it there.

I know this links to the WF Database, table user_param.
But I don't know how to link a user with the trustee_id in that table.

 

Any ideas?

Can this be done with the SDK instead of SQL?

Thanks

Gian

0 0

Answer

SELECTED ANSWER
replied on November 11, 2015

Oh, you said "LF user", so i took it to mean repository users, not active directory users. For active directory, you are correct they are stored in the user_param table. The trustee_id in user_param is the user's objectGUID property from active directory, parameter_type corresponds to the parameter_type column in the param_type column.

0 0

Replies

replied on November 10, 2015

For Laserfiche repository users, the default folders are saved in user attributes in the repository, not the SQL database.

0 0
replied on November 10, 2015

Hi Miruna,

But normally when we setup a new user we go to the Workflow Designer and set it under the trustee configuration.

These are all active directory users.

If there is an attribute I can use which one is it?

 

Thank you

Gian

0 0
SELECTED ANSWER
replied on November 11, 2015

Oh, you said "LF user", so i took it to mean repository users, not active directory users. For active directory, you are correct they are stored in the user_param table. The trustee_id in user_param is the user's objectGUID property from active directory, parameter_type corresponds to the parameter_type column in the param_type column.

0 0
replied on October 9, 2017

Hey Miruna,

 

Would it be safe to assume, that during a migration, after updating all the WF connection profiles, that you could copy the dbo.user_param table over to capture any newly created users and their directory associations? Do you think this would have any adverse effects?

 

I really don't want to have to re-fresh the whole database and go through and update all the connetion profiles on the workflows again...

 

Cheers!

0 0
replied on October 9, 2017

What sort of migration? Changing Workflow connection profiles has nothing to do with the AD users.

0 0
replied on October 9, 2017

Hey, probably didn't explain this very well.

 

Let's imagine there is Server A and server B, server A is the source server, and server B is the destination server. I've copied the LF repository DB, the LF volumes and the WF DB over to Server B and re-configured everything in the new environment on server B.

 

Now several months have passed and new documents and new users have been added to Laserfiche, but no WF changes/template changes or system design changes have been made, just new documents and new users.

 

So I'm going to re-copy the repository DB and robocopy over the volume changes to update the repository (I've matched the drive letters so no volume re-configuration is necessary). However I don't want to copy over the whole WF database as nothing has changed apart from new users being added with their respective home folder locations. I'm wondering is simply copying over the dbo.user_param table here is going to have any adverse effects on the rest of the DB (I can't see or think why, but just wanted to be sure). The reason behind this, is I don't want to have to iterate through the many workflows to update the connection profiles (again). Unless there is a way you know of to update many workflows connection profiles in one go (this would be a good feature request actually).

Hope this helps explain a bit better....

Cheers!

0 0
replied on October 9, 2017

Ok, that makes a lot more sense now. Thanks!

As long as the user SIDs match, that should be fine. Any new trustee directories will not be picked up this way.

If you are swapping out the repository, you should stop the Subscriber and reset the ASN value in HKLM\Software\Laserfiche\Workflow\Monitored Repositories\<repo GUID>. Set it to 0 so the Subscriber will only process events going forward. Otherwise, depending on whether it's behind or past the ASN number in the real repo, it will either process events again or ignore events until the number saved in its registry matches the ID of an event coming in.

1 0
replied on October 13, 2017

Hi Miruna, I can't seem to find that registry key on the WF server?

0 0
replied on October 13, 2017

This key was missing becuase the user the WF service was running as, didn't have rights to create the key.

0 0
replied on January 24, 2018

Hi Miruna, Just picking back up on this, if I stop the WF and subscriber service, and set the ASN to 0 on the WF server, once I re-start the services again, there are several hundred workflows triggered. How can I clear the subscriber queue?

 

0 0
replied on January 24, 2018

It sounds like your server had a backlog of events that were processed by the subscriber and matched its starting rules but didn't start a workflow yet.

Workflow writes these events to Windows message queues while they're waiting for the Workflow server to pick them up.

Control Panel\Administrative Tools\Computer Management\Services and Applications\Message Queuing\Private Queues. You can clear any queue whose name starts with "lfwf"

0 0
replied on January 25, 2018

Thanks Miruna,

 

So I've stopped both WF services, deleted all the queues in there that start lfwf (which was all of them actually), cleared the ASN to 0 and re-started everything. The workflows have now all stopped running which is fab, however I now can't get any action to appear in the subscriber tracer. It seems to no longer be monitoring the repository, I've double checked the monitored repositories in the WF configuraiton manager, and that's all correct.

I also notice that refreshing the registry that the ASN keep rising, it's currently at 18476744. Is there something else I need to do in order to get this working?

What if I match the ASN value from the previous WF server? Will that help it match up?

Cheers!

0 0
replied on January 25, 2018

I will have to raise a support case for this, as the migration is this weekend and it's not picking up any changes in the repo right now, so this is super urgent!

0 0
replied on January 26, 2018

Hey Miruna, just to add some closing remarks on this. The issue was with the app server in the end, for whatever reason the subscriber was not picking up any repository events...strange one! Re-started the LF server services on the app server and it all burst into life!

0 0
replied on January 26, 2018

Your support case doesn't have the Wokflow logs so I can't really tell what was going on. But one thing that's weird in the event viewer log in the case is the string of "invalid object name" errors from SQL. It's like Workflow's database was swapped out behind its back with an empty one or the service user lost rights to read from the database.

0 0
replied on January 26, 2018

That’s exactly what happened with the dB. I tried overwriting it with a fresh copy from the current production which was currently working just fine. Just to rule out any dB issues. Alas it wasn’t the dB here that was the issue. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.